title: Data structure that allows accessing elements by index and delete them in O(1)
body: <p>I have following task (as part of bigger task):</p>
  
  <p>I need to take an <code>k</code> element from array like data structure and delete it (k is any possible index). Array have O(n) for deleting elements, and List have O(n) for searching element. I would like to do both operations in O(1) time.</p>
  
  <p>Which data structure should I use to meet this requirement?</p>
  
  <p>Clarification:</p>
  
  <p>Deleting element on index(5) will move element from index(6) to index(5).</p>
  
  <p>This particular task is topcoder srm 300 div2 500 points problem. It does not require such sophisticated data structure (simple java methods will do the job since max data is really small), but I am curious how to deal with much bigger problem using c-like thinking about data.</p>
  
  <p>So maybe I am sticked to much to array for this problem? But I will analyze it and edit question later, after work (if you are really curious, you can see task on top coder).</p>