04 Try it yourself Interactive
Step through the same array, 1 2 3. Each row is one live decision on the path from the root down to where the search is now, cur is the working list, and a rose row is an un-choose actually happening. Then switch to permutations, which choose by swapping instead of pushing — same three steps, different tree. Nothing moves until you press Next.