title: Finding the balance point in an array
body: <p>This question is from a great youtube channel, giving problems that can be asked in interviews.</p>
  
  <p>It's basically related to finding the balance point in an array. Here is an example to best explain it;
  {1,2,9,4,-1}. In here since sum(1+2)=sum(4+(-1)) making the 9 the <b>balance point</b>. Without checking the answer I've decided to implement the algorithm before wanted to ask whether a more efficient approach could be done;</p>
  
  <ol>
  <li>Sum all the elements in array <b>O(n)</b></li>
  <li>Get the half of the sum <b>O(1)</b></li>
  <li>Start scanning the array, from left, and stop when the <b>sumleft</b> is bigger than half of the general sum. <b>O(n)</b></li>
  <li>Do the same for the right, to obtain <b>sum right.</b> <b>O(n)</b>.</li>
  <li>If <b>sumleft</b> is equal to <b>sumright</b> return <b>arr[size/2]</b> else return <b>-1</b></li>
  </ol>
  
  <p>I'm asking because this solution popped into my head without any effort, providing the O(n) running time. Is this solution, if true, could be developed or if not true any alternative methods?</p>