Mental Model
Find the next bigger arrangement of numbers by changing the smallest possible part of the array.
Analogy: Imagine you have a lock with numbers. To get the next code, you try to increase the last digits without changing the earlier ones too much.
Array: [1, 2, 3, 4, 5] Indexes: 0 1 2 3 4 We want to find the next bigger order by changing from the right side.
