title: how to know array elements are perfectly centered?
body: <p><code>{3, 2, 10, 4, 1, 6, 9}</code> is perfectly centered array because <code>10+4+1=15</code> sequence is preceded and succeeded by same number of elements  i,e two.</p>
  
  <pre><code>  mid=arraylength/2;
      for(int i=0;i&lt;arraylength;i++){
             int sum=a[mid]+a[mid+1+i]+a[mid-1-i];
             if(sum==15) break;
  }
  </code></pre>
  
  <p>after calculating <code>sum=15</code>,how to know <code>10,4,1</code> is preceded and succeeded by same number of elements?</p>