Exercise - Working with Map

🧑‍🤝‍🧑 Task

You need to create a Map to store States and their respective populations. Then show:

  • Replace the RN's population
  • Check if PB is present. Otherwise, add it
  • PE's population
  • All states and their populations in the insertion order
  • The smallest state
  • The biggest state
  • Sum all populations
  • Average population
  • Remove all states with less than 4.000.000 people
  • Clear it and check