Bloomberg LP Interview QuestionFinancial Software Developers
- 2of 2 votes
Q: If I give you a new book, and ask you to create the index which is found at the end of the book, how will you do it.
A: I said for constant addition time of words (and page numbers) in the data structure, we can use Hashmap or TRIE. But since output has to be in alphabetic order, we will use a Trie DS, where at the end of each word, we simple store a list of page numbers.
Country: United States
Interview Type: Phone Interview