To find the largest BST in BT we need to write a function to find the largest subtree which is also a Binary Search Tree (BST).

A Tree is BST if following is true for every node x.

1. The largest value in left subtree (of x) is smaller than value of x.

2. The smallest value in right subtree (of x) is greater than value of x.

Example :

Here the maximum size BST subtree is :

Size of the largest BST is 2
>>>

## Comments