public static TreeNode lowestCommonAncestor(TreeNode root, TreeNode a,
			TreeNode b) {
		TreeNode left = null;
		TreeNode right = null;
		if (root == null || root == a || root == b) {
			return root;
		}
		left = lowestCommonAncestor(root.left, a, b);
		right = lowestCommonAncestor(root.right, a, b);
		if (left != null && right != null) {
			return root;
		}
		if (left == null) {
			return right;
		}
		if (right == null) {
			return left;
		}
		return null;
	}