sry for my 2nd post ...that soln which i hve pasted is 4 m-ary treeplzzz
consider it in that...
--
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 grou
your question is very similar to this acm problem:
http://www.acmgnyr.org/year2009/e.pdf
and my approach was to find the number of characters at the end of string
that are sorted decreasingly e.g. in "abcgda" the length of such sub-string
is 3 ( "gda" ) then look at the next char (here it is 'c'
@nisha if i/p=abdc then
o/p=acbd
ur approach gives abcd
--
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...@
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 wrote:
>
> is this approach works
> 1. write the post order traversal of T1 and T2 and save it in strings P1
> and P
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
write a c code to print lexicographically next string of the given
word i.e as in dictionary next word after this word having similar
letters
for ex
i/pabcd
o/p abdc
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group,