title: Data Structure that supports constant time for addbegin, addend and random access
body: <p>I am looking for a data structure that supports constant time performance for adding an element to the beginning, end, and random access.</p>
  
  <p>I am thinking double ended queue. Does double ended queue support constant time performance for random access? If so, how does it achieve it?</p>
  
  <p>I know one can use double linked list to build a double ended queue. But How do you build an index on all the elements to achieve constant time random access?</p>
  
  <p>Thank you for your help.</p>
  
  <p>Jerry</p>