Skip to content

Commit 559c01e

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

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sorts/insertion_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def insertion_sort[T: Comparable](collection: MutableSequence[T]) -> MutableSequ
4949
>>> collection = random.choices(string.ascii_letters + string.digits, k=100)
5050
>>> insertion_sort(collection) == sorted(collection)
5151
True
52-
52+
5353
Time Complexity: (O(n^2))
5454
Space Complexity:(O(n))
5555
"""

sorts/pancake_sort.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def pancake_sort(arr: MutableSequence[int]) -> MutableSequence[int]:
2323
[]
2424
>>> pancake_sort([-2, -5, -45])
2525
[-45, -5, -2]
26-
26+
2727
Time Complexity: O(n^2)
2828
Space Complexity: O(n)
2929
"""
@@ -38,6 +38,8 @@ def pancake_sort(arr: MutableSequence[int]) -> MutableSequence[int]:
3838
cur -= 1
3939
return arr
4040

41+
4142
if __name__ == "__main__":
4243
import doctest
44+
4345
doctest.testmod()

0 commit comments

Comments
 (0)