task3 #2

Merged
schmidmarco merged 40 commits from task3 into main 2026-03-13 10:11:18 +01:00
Showing only changes of commit fbe9f4bf02 - Show all commits

View File

@ -9,7 +9,13 @@ def next_bigger(n):
if pivot == -1: if pivot == -1:
return -1 return -1
print(pivot) right = digits[pivot + 1 :]
swamp = right.index(min(right))
print(digits)
digits[pivot], digits[len(digits) - len(right) + swamp] = (
right[swamp],
digits[pivot],
)
return digits return digits