Meta interview question

Medium leet code question on hashmaps