educative.io

Educative

End() in unordered_map

(charFrequencyMap.find(rightChar) != charFrequencyMap.end())

in c++ reference
“Notice that an unordered_map object makes no guarantees on which order its elements follow. But, in any case, the range that goes from its begin to its end covers all the elements in the container (or the bucket), until invalidated”

How can we rely on a random result and what does this check give us ?


Type your question above this line.

Course: https://www.educative.io/collection/5668639101419520/5671464854355968
Lesson: https://www.educative.io/collection/page/5668639101419520/5671464854355968/4679331609575424

Hi @Pogos ,

Thank you so much for pointing it out and we have updated the solution. Current solution doesn’t contain any End(). Please let us know if there are any queries.