We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8934bab commit f11c5ecCopy full SHA for f11c5ec
sorts/bubble_sort.py
@@ -4,6 +4,11 @@
4
def bubble_sort_iterative(collection: list[Any]) -> list[Any]:
5
"""Pure implementation of bubble sort algorithm in Python
6
7
+ Sort a list of numbers in ascending order using the bubble sort algorithm.
8
+ Bubble sort repeatedly steps through the list, compares adjacent elements,
9
+ and swaps them if they are in the wrong order. This process continues until
10
+ the list is fully sorted.
11
+
12
:param collection: some mutable ordered collection with heterogeneous
13
comparable items inside
14
:return: the same collection ordered by ascending
0 commit comments