I need a container (not necessarily a STL container) which let me do the following easily:
- Insertion and removal of elements at any position
- Accessing elements by their index
- Iterate over the elements in any order
I used std::list, but it won't let me insert at any position (it does, but for that I'll have to iterate over all elements and then insert at the position I want, which is slow, as the list may be huge). So can you recommend any efficient solution?