MindTickle Interview Question

Print all the permutations on an array.