Is key look up on std::map O(1)? I thought it was until I thought about it more. It is based on a tree implementation so the lookup time should be O(log N), cor
Basicaly std::map is implimented using red-black tree. In red-black tree insert ans delete operation take O(LogN) time, so in std::map time complexity is O(LogN) of every element.
std::unodered_map is implememted using hashing ,where every operation take O(1) time.