CaaStle interview question

Dsa question on hashmap and queue