in phonebook program, may I use unoedered<string, int> mp;
because sir has used unordered with vector, please explain why sir has used
About unordered map
hey @mkjha it is possible that many people with same name have different numbers, so it is possible to store all the numbers if you are using vector on int.
in unordered map we can use for store the int value,if same name occur
sir has used unordered_map<string,vector> mp. why did he use vector
if i use unordered_map<string,int> m. in phonebook programm what will error occur
if you use <string ,int> you wont be able to store multiple entried the new entries will over write the old ones.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.