public static void main(String args[]){
        LargestBSTInBinaryTree lbi = new LargestBSTInBinaryTree();
        ConstructTreeFromInOrderPreOrder ctf = new ConstructTreeFromInOrderPreOrder();
        //this is just to create a binary tree.
        int inorder[]  = {-7,-6,-5,-4,-3,-2,1,2,3,16,6,10,11,12,14};
        int preorder[] = {3,-2,-3,-4,-5,-6,-7,1,2,16,10,6,12,11,14};
        Node root = ctf.createTree(inorder, preorder);
        int largestBSTSize = lbi.largestBST(root);
        System.out.println("Size of largest BST  is " + largestBSTSize);
        assert largestBSTSize == 8;
    }
Date 07/20/2014
@author tusroy

Video link - https://youtu.be/4fiDs7CCxkc

Given a binary tree, find size of largest binary search subtree in this
binary tree.

Traverse tree in post order fashion. Left and right nodes return 4 piece
of information to root which isBST, size of max BST, min and max in those
subtree. 
If both left and right subtree are BST and this node data is greater than max
of left and less than min of right then it returns to above level left size +
right size + 1 and new min will be min of left side and new max will be max of
right side.

References:
http://www.geeksforgeeks.org/find-the-largest-subtree-in-a-tree-that-is-also-a-bst/
https://leetcode.com/problems/largest-bst-subtree/
src/com/interview/tree/LargestBSTInBinaryTree.java