Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sorts/bubble_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
:param collection: some mutable ordered collection with heterogeneous
comparable items inside
:return: the same collection ordered by ascending

Check failure on line 10 in sorts/bubble_sort.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W293)

sorts/bubble_sort.py:10:1: W293 Blank line contains whitespace
Time Complexity: O(n^2) - where n is the number of elements
Space Complexity: O(1) - only uses a constant amount of extra space

Examples:
>>> bubble_sort_iterative([0, 5, 2, 3, 2])
Expand Down Expand Up @@ -59,6 +62,9 @@

:param collection: mutable ordered sequence of elements
:return: the same list in ascending order

Check failure on line 65 in sorts/bubble_sort.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W293)

sorts/bubble_sort.py:65:1: W293 Blank line contains whitespace
Time Complexity: O(n^2) - where n is the number of elements
Space Complexity: O(n) - due to recursive call stack

Examples:
>>> bubble_sort_recursive([0, 5, 2, 3, 2])
Expand Down
Loading