Commit 97a4f5c
authored
Add time and space complexity to bubble_sort docstrings
Enhanced documentation for bubble_sort_iterative and bubble_sort_recursive functions by adding:
- Time Complexity: O(n^2) for both implementations
- Space Complexity: O(1) for iterative, O(n) for recursive due to call stack
This improves code readability and helps developers understand algorithm performance characteristics. Addresses issue #13948 about documentation inconsistencies.1 parent a051ab5 commit 97a4f5c
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
0 commit comments