Nureva Interview Question

Leetcode easy problem involving basic data structures