Well it Seems like problem is the DS here.

if U have the DS of trie as

  struct trie {
                      char letter;// Not being general
                      boolean islast;
                      int startindex;
                      struct trie *next;
                  };

I am sure  you won't have any issue. coz now what u have to do is to start
searching the code which matches the "startindex" with the given input and
search till the "islast" is not equal to true. Well thats how trie works if
ppls are unaware..

BR,
Prem

On Thu, Jun 28, 2012 at 12:23 PM, deepikaanand <[email protected]>wrote:

> If there is a trie of following strings(say URLs)
> "abcde","abcegh","abcpqr","abcxyz","xyz"
>
> if input = abc
> then output should be = de,egh,pqr,xyz
>
> How can I code for this ???
>
> --
> 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