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