I am looking for a data structure that maintains constant time performance for adding an element to the beginning, end, and random access.
I think of a double line. Does the double-ended queue maintain consistent performance over time for random access? If so, how is this achieved?
I know that you can use a double linked list to create a double-ended queue. But how do you create an index for all elements to achieve consistent random access?
Thank you for your help.
Jerry
source share