Stacks can be used. On Jul 20, 4:18 pm, mallesh <mallesh...@gmail.com> wrote: > We are given two strings. A and B. > > First few letters of A match with Last letters of B. We have to find > the longest match in linear time. > Example: > char * A ="This is my first post to this group"; > char *B= "to this group this is my post"; > > Algorithm should return starting position of substring "to this group" > in string A. > > How do we do this? > > -Thanks and regards, > Mallesh
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.