Mental Model
Find the next bigger arrangement of numbers by changing the smallest possible part of the array.
Analogy: Imagine you have a row of books sorted in a certain order. To find the next order, you look from right to left to find the first book that can be swapped with a bigger book to its right, then rearrange the books after it to the smallest order.
Array: [1] -> [2] -> [3] -> [4] -> [5] Indexes: 0 1 2 3 4
