Radwan Cherfy
1
Q:

complexict of map c++

Map is implemented as balanced tree structure that is why it is possible to maintain an order between the elements (by specific tree traversal). Time complexity of map operations is O(Log n) while for unordered_map, it is O(1) on average.
2

New to Communities?

Join the community