HubSpot Interview Question

leetcode question, easy level ,something like hashmap