The AddressBook class defines a field to record the number of entries. Do you think it would be more appropriate to calculate this value directly, from the number of unique entries in the TreeMap? For instance, can you think of any circumstances in which the following calculation would not produce the same value?
return book.size() / 2;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.