LinkedIn interview question

Divide an array into subarray with equal sum.