For a given binary tree, find the largest subtree which is also binary search tree?
Example:
Input:
10
/
A binary search tree will give you a sorted result if you do a IN-ORDER Traversal. So, do an in-order traversal for the entire binary tree. The longest sorted sequence is your largest binary search sub tree.