public int maxDepth(treeNode root) {
		if (root == null)
			return 0;

		if (root.leftLeaf == null && root.rightLeaf == null)
			return 1;

		if (root.leftLeaf != null && root.rightLeaf != null) {
			int maxLeft = maxDepth(root.leftLeaf);
			int maxRight = maxDepth(root.rightLeaf);

			return maxLeft <= maxRight ? (maxRight + 1) : (maxLeft + 1);
		}

		// rightLeaf only
		if (root.leftLeaf == null) {
			return maxDepth(root.rightLeaf) + 1;
		} else {// leftLeaf only
			return maxDepth(root.leftLeaf) + 1;
		}
	}