Skip to content

Commit d44325d

Browse files
committed
Update loop syntax
1 parent 494ac1e commit d44325d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code/python/sorting_algorithms/pancake_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def pancake_sort(arr: list) -> None:
22
n = len(arr)
33

4-
for size in range(n, 1, -1):
4+
for size in reversed(range(2, n + 1)):
55
max_idx = find_max_index(arr, size)
66

77
if max_idx != size - 1:

0 commit comments

Comments
 (0)