15
                  /    \
               8      25
                      /    \
                  20      22


On Sep 26, 10:45 am, Chonku <cho...@gmail.com> wrote:
> This can also be done if we do an inorder traversal of the binary tree and
> look for the longest continuous sequence of numbers in ascending order.

Your idea will fail for above case.

In Order =>  8 15 20 25 22
longest continuous sequence of numbers in ascending order => 8 15 20
25

But that's not the answer (I hope you realize what correct output
would be )





-- 
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.

Reply via email to