Array breaking point according to sum

http://www.careercup.com/question?id=5449136090382336