Zilingo Interview Question

tree top view permutations of array