Skip to content

Commit bd01517

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4862428 commit bd01517

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sorts/pancake_sort.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"""
1010

1111
from __future__ import annotations
12+
13+
1214
def pancake_sort(arr):
1315
"""Sort Array with Pancake Sort.
1416
:param arr: Collection containing comparable items
@@ -20,8 +22,8 @@ def pancake_sort(arr):
2022
[]
2123
>>> pancake_sort([-2, -5, -45])
2224
[-45, -5, -2]
23-
24-
Time Complexity: (O(n^2))
25+
26+
Time Complexity: (O(n^2))
2527
Space Complexity: (O(n))
2628
"""
2729
cur = len(arr)
@@ -35,6 +37,8 @@ def pancake_sort(arr):
3537
cur -= 1
3638
return arr
3739

40+
3841
if __name__ == "__main__":
3942
import doctest
43+
4044
doctest.testmod()

0 commit comments

Comments
 (0)