public int minDepth(treeNode curRoot) {
		if (curRoot == null)
			return 0;

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

		if (curRoot.leftLeaf != null && curRoot.rightLeaf != null) {
			int minLeft = minDepth(curRoot.leftLeaf);
			int minRight = minDepth(curRoot.rightLeaf);

			return minLeft <= minRight ? (minLeft + 1) : (minRight + 1);
		}

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