you can use suffix tree for this kind of problem.

http://www.allisons.org/ll/AlgDS/Tree/Suffix/

Thanks & Regards,
Senthil S

On Fri, Feb 3, 2012 at 4:12 AM, Ravi Ranjan <[email protected]> wrote:

> Implement a MS key suggest like tool where on typing the first letters
> will give a list of words starting with the typed text. The corpus will be
> provided as a text file. Max number of characters in a word is 10.
>  - Say you type 'i', it should provide 'include | if ' as the words in the
> dropdown
>
> do it with minimum complexity???
>
> less than O(n)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to