We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
So as you see performing an operator[] on our map resulted in a side effect of creating map element <key>, <default value>.
It kinda doesn't matter for original problem, since you can solve it as was shown above. But this could be notable for some particular cases elsewhere.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maps-STL
You are viewing a single comment's thread. Return to all comments →
Following code
generates next output
So as you see performing an operator[] on our map resulted in a side effect of creating map element
<key>, <default value>
. It kinda doesn't matter for original problem, since you can solve it as was shown above. But this could be notable for some particular cases elsewhere.