What will be the time complexity of simple map STL for insertion,deletion and searching?

Is the time complexity is same as that of hashing ?
Insertion-> O(1)
Deletion-> O(1)
Searching-> O(1)

No
for map time complexity of
insertion / Deletion

  • Time complexity : log(n) where n is size of map

Searching
O(log n)

Why the time complexity of searching takes O(1). It should also require O(logn) time as it is implemented using self balancing tree.

And then what is time complexity of Unordered map?

yes
it is O(logn) for map
and O(1) for unordered map

for unordered map
for insertion / erase
Time complexity
Constant i.e. O(1) in average case. Linear i.e. O(n) in worst case.

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like :heart:: and don’t forgot to mark doubt as resolved :grinning: