I have attended a google phone interview today and I was able to clear it. The following was the question.
Data structure to store and retrieve contacts. https://leetcode.com/problems/add-and-search-word-data-structure-design/
eg: michael, michelle are the names stored, when the user enters 'mich' it should return all the names that match those names. If nothing is entered, it should bring all the names from the dictionary.
I suggested 'map' and 'trie' approaches, i was asked which one was better and why, i answered it. There was a DFS implementation in the trie approach, he asked which one is better, DSF or BFS and also in this situation which one i am using and why not BFS.
I was lucky to get it in medium level difficulty question, i need to schedule the virtual face to face now. Good luck every one.