Infineon Technologies Interview Question

Print all the permutations of a array.