Divide list with min sum (input array should be sorted)