urs s correct 1ly for few cases.. but in the following case it doesnt give the longest seq: abadabac here 'aba' will be printed and not 'abadaba', which s d correct ans
On Aug 22, 5:18 am, venkatesan B <[email protected]> wrote: > use stackpush one by one element before compare to top 2 element in stack {if > same then pop element and compare next char of string with top char in > stackif same continue otherwise clear stack}else{push element to stack} > if wrong correct me -- 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.
