LinkedIn Interview Question

Divide an array into subarray with equal sum.