Is there a data structure in C ++ with search O(1)?
A std::maphas O(log(n))a search time (right?).
I look from something in stdpreferably (so not Boost pls). Also, if there is, how does it work?
EDIT: Well, I was not clear enough, I think. I want to bind values, sort of like in map. Therefore, I need something like std::map<int,string>that, findand I inserthave to accept it O(1).
source
share