title: How to add an element to Array and shift indexes?
body: <p>I need to add an element to Array specifying position and value.
  For example, I have Array</p>
  
  <pre><code>int []a = {1, 2, 3, 4, 5, 6};
  </code></pre>
  
  <p>after applying <code>addPos(int 4, int 87)</code> it should be</p>
  
  <pre><code>int []a = {1, 2, 3, 4, 87, 5};
  </code></pre>
  
  <p>I understand that here should be a shift of Array's indexes, but don't see how to implement it in code.</p>