Skip to content

Commit 82b8a74

Browse files
committed
[mypy] Reworked code for cocktail_shaker_sort so that missing return statement error is resolved(TheAlgorithms#4085)
1 parent 2e31573 commit 82b8a74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sorts/cocktail_shaker_sort.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def cocktail_shaker_sort(unsorted: list) -> list:
3333
swapped = True
3434

3535
if not swapped:
36-
return unsorted
36+
break
37+
return unsorted
3738

3839

3940
if __name__ == "__main__":

0 commit comments

Comments
 (0)