You are given an infinite supply of words, which are coming one by one, and length of words, can be huge and is unknown how big it is. How will you find if the new word is repeated, what data structure will you use to store.
use suffix tree , take sequence of word with space , if new word come, search in suffix tree and modify tree
how will you implement Suffix tree in the interview ?
I think in interview we should start with simple solution, one can enhance our solution during discussion.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks