OYO interview question

Based on Trie, Trees, Graphs