Buttercola: LinkedIn: Find the balanced point of an unsorted array
LinkedIn: Find the balanced point of an unsorted array
Given a unsorted array, find the balanced point where the total sum of its left equals to the sum of its right. Return the index. If not exist, return -1.
e.g. [1, 2, 1, 3, 0]. Return 2
e.g. [1, 2, 1, 3, 0]. Return 2
Read full article from Buttercola: LinkedIn: Find the balanced point of an unsorted array
No comments:
Post a Comment