HubSpot interview question

leetcode question, easy level ,something like hashmap