Tesla interview question

caching using hashmap and getting unique additions