Raintree Interview Question

All permutation of an array