LinkedIn Interview Question

Partition an array into n equal subsets