Paycom interview question

leetcode medium, had to use hashmap.