public int sumNumbersItr(TreeNode root) {
		// IMPORTANT: Please reset any member data you declared, as
		// the same Solution instance will be reused for each test case.
		int res = 0;
		int tmp = 0;
		if (root == null)
			return res;
		Stack<TreeNode> stack = new Stack<TreeNode>();
		HashSet<TreeNode> visited = new HashSet<TreeNode>();
		stack.push(root);
		TreeNode node = null;
		while (!stack.isEmpty()) {
			node = stack.peek();
			if (visited.contains(node)) {
				tmp /= 10;
				stack.pop();
				continue;
			}
			visited.add(node);
			tmp = tmp * 10 + node.val;
			if (node.left == null && node.right == null) {
				res += tmp;
				tmp /= 10;
				stack.pop();
			}
			if (node.right != null)
				stack.push(node.right);
			if (node.left != null)
				stack.push(node.left);
		}
		return res;
	}