Is there any additional condition saying if last 'n' characters of first list should match with first 'n' characters of 2nd list ?
On Oct 7, 12:52 pm, snehal jain <learner....@gmail.com> wrote: > There are two linked list, both containing a character in each node. > > If one linked list contain characters o x e n c and second contain > characters e n c a r t a then the final linked list should contain o x > e n c a r t a i.e. if the end of one list is same as the start of > second then those characters should come only once. > > can we do it in O(n+m) where n and m are the length of list. both are > singly link list. -- 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.