Question: 1. When you wrote the FindareaCode program for the preceding exercise, it is likely that you generated the list of area codes for a state
1. When you wrote the FindareaCode program for the preceding exercise, it is likely that you generated the list of area codes for a state by looping through the entire map and printing any area codes that mapped to that state. Although this strategy is fine for small maps like the area code example, efficiency becomes an issue in working with much larger data maps. An alternative approach is to invert the map so that you can perform lookup operations in either direction. You can't, however, declare the inverted map as a Map
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
