Skip to content

Commit 7c4cc3a

Browse files
authored
Add type hints to is_sorted()
1 parent 983c289 commit 7c4cc3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/bozo_sort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def bozo_sort(array: list) -> list:
2727
>>> bozo_sort([8, 16, 0, 4, 10])
2828
[0, 4, 8, 10, 16]
2929
"""
30-
31-
def is_sorted(array):
30+
31+
def is_sorted(array: list) -> bool:
3232
for i, n in enumerate(array):
3333
if i < len(array) - 1 and n > array[i + 1]:
3434
return False

0 commit comments

Comments
 (0)