We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 367307d commit 96f74b1Copy full SHA for 96f74b1
sorts/stalin_sort.py
@@ -3,6 +3,8 @@
3
Elements that are not greater than or equal to the previous element are discarded.
4
Reference: https://medium.com/@kaweendra/the-ultimate-sorting-algorithm-6513d6968420
5
"""
6
+
7
8
def stalin_sort(sequence: list[int]) -> list[int]:
9
10
Sorts a list using the Stalin sort algorithm.
@@ -44,4 +46,5 @@ def stalin_sort(sequence: list[int]) -> list[int]:
44
46
45
47
if __name__ == "__main__":
48
import doctest
49
50
doctest.testmod()
0 commit comments