LinkedIn interview question

Partition an array into n equal subsets