Meta Interview Question

leetcode hashmap simply question and a follow up