I am looking for a C ++ container class that is indexed as std::vector but has quick insertion, deletion, and indexing. For example, the vector interface implemented with the base balancing tree will contain O / logN) and O (logN) inserts / deletes.
To be clear: I'm not looking for std::map<int, T> . Inserting an element with index N should increase the indices of all subsequent elements in the array, which would not be the case with std::map<int, T> .
I found an AVL Array that does exactly what I am looking for. It has the correct interface, but I would like to see if there are other options.
Do you know any other (production qualities) implementations? Maybe something more popular (with something like something like that?). Something with a smaller memory size? (A node containing a pointer in an AVL array is 64 bytes on my machine.)
source share