public boolean isValidBST(TreeNode root) {
        // Start typing your Java solution below
        // DO NOT write main() function
        if (root == null) return true;
        //if (root.left == null && root.right == null) return true;
        
        Integer preVal = Integer.MIN_VALUE;
        return inOrder (root, preVal);
        
    }