can be done using some modification in postorder traversal
call to left subtree will return that if left subtree is a BST of not
call to right subtree will return that if right subtree is a BST of not
if both subtrees are BST's check for curr and return its status

2 additional pass by ref. parameters will be needed for count and root of
current best subtree
On Sun, Jul 10, 2011 at 11:08 PM, Decipher <ankurseth...@gmail.com> wrote:

> no of nodes
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/MuNISw2QkYIJ.
>
> To post to this group, send email to algogeeks@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.
>



-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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