public boolean isValidBST(TreeNode root) {
        if (root == null) {
            return false;
        }
        
        ArrayList<Integer> result = new ArrayList<Integer>();
        inOrderTraverse(root, result);
        
        for (int i = 1; i < result.size(); i++) {
            if (result.get(i -1 ) >= result.get(i)) {
                return false;
            }
        }
        return true;
    }