public boolean inOrder(TreeNode root, int[] preVal) {

		if (root == null)
			return true;

		if (!inOrder(root.left, preVal))
			return false;

		if (preVal[0] >= root.val) {
			return false;
		} else {
			preVal[0] = root.val;
		}

		if (!inOrder(root.right, preVal))
			return false;

		return true;
	}