Hey guys...so for my homework i have to do this...would it be possible if someone helped me with this? Not very familiar with maps and stuff like that yet...thx a lot! So here's the question:
Suppose there is an application that allows users to enter a phone number to search for a name. After running the application for a long time, it is found that the application used up a lot of memory. It is known that the phone book is defined as a map in the program:
map<int, string> phonebook;
And the lookup function is implemented as follow:
string lookup(int phone) {
return phonebook[phone];
}