• Tutorials
  • Courses
  • Tracks

unordered map Question 1

Last Updated :
Discuss
Comments

If you insert a key that already exists in a unordered_map, what happens?

The program crashes.

Nothing happens; the insertion is ignored.

The old value is replaced with the new value.

The existing key-value pair is updated with the new value.

Share your thoughts in the comments