Neeva interview question

LC medium using hashmap and arrays