public boolean isValidBSTHelper(TreeNode node, int min, int max)
    {   
        if(node == null)
            return true;
        if(node.val > min && node.val < max)
            return (isValidBSTHelper(node.left, min, node.val) && isValidBSTHelper(node.right,node.val, max) );
        return false;
    }