TreeNode buildTreeAux(int[] preorder, int[] inorder, int ps, int pe,
			int is, int ie) {
		TreeNode root = new TreeNode(preorder[ps]);

		int i = is;
		while (inorder[i] != preorder[ps]) {
			i++;
		}

		if (i - 1 >= is)
			root.left = buildTreeAux(preorder, inorder, ps + 1, ps + i - is,
					is, i - 1);
		if (i + 1 <= ie)
			root.right = buildTreeAux(preorder, inorder, ps + i - is + 1, pe,
					i + 1, ie);

		return root;

	}