Fenergo Interview Question

Coding challenge was related to array permutation.