MLP Interview Question

Compute the permutation of an array