i think if we just reverse the last two alphabets of the string then also it will the next lexicographic string having the same alphabets.
any comments?? On 6/21/10, sharad kumar <[email protected]> wrote: > > is this approach works > 1. write the post order traversal of T1 and T2 and save it in strings P1 > and P2. > 2. similarly write the In order traversal of T1 and T2, saving it in > strings I1 and I2. > 3. if T1 contains T2, then P1 contains P2 and I1 contains I2 as substrings. > > -- > 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]<algogeeks%[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.
