Return every permutation of distinct nums in depth-first input-choice order.
nums
How can in-place swapping reduce per-branch allocations?