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 456d644 commit 92c437dCopy full SHA for 92c437d
1 file changed
sorts/pancake_sort.py
@@ -8,8 +8,10 @@
8
python pancake_sort.py
9
"""
10
11
+from typing import List
12
-def pancake_sort(arr):
13
+
14
+def pancake_sort(arr: List[int]) -> List[int]:
15
"""Sort Array with Pancake Sort.
16
:param arr: Collection containing comparable items
17
:return: Collection ordered in ascending order of items
@@ -36,4 +38,4 @@ def pancake_sort(arr):
36
38
if __name__ == "__main__":
37
39
user_input = input("Enter numbers separated by a comma:\n").strip()
40
unsorted = [int(item) for item in user_input.split(",")]
- print(pancake_sort(unsorted))
41
+ print(pancake_sort(unsorted))
0 commit comments