What are some other ways that we use maps?


#1

Question

In the context of this exercise, introducing Hash Maps, what are some ways that we use maps?

Answer

Maps are used for and apply to many things in the real world. Generally, any relationship where you can “map” or create a correspondence between different items can be considered a map.

For example, the US states and their capitals can be a map. Locations and their zip codes can also be a map.

Another example can be phone books, which map a person’s name to their phone number. Similarly, dictionaries map words to their definitions.

In computer programs, user id’s are mapped to their information in databases. In addition, computer caches utilize the idea of maps, to map memory addresses to data.

Feel free to share any other maps you can think of.