Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

unordered_map miss complexity

$
0
0

Good day,

we know that search in std::unordered_map has constant or linear complexity whether the key is found or not.

here are my questions:

1. What is the complexity of unordered_map::find if the key is not found?

2. What is the complexity of map::find if the key is not found?

3. Is there a better method than find to do look for a keyvalue pair then update the value if found?

please do give some links on the documentation for the case where the key is not found




Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>