BNY Interview Question

print all permutation or an array