public int visit(TreeNode node, int depth) {
		if(node.left == null && node.right == null) return depth + 1;
		else if(node.left == null) return visit(node.right, depth + 1);
		else if(node.right == null) return visit(node.left, depth + 1);
		else {
			int left = visit(node.left, depth + 1);
			int right = visit(node.right, depth + 1);
			return (left < right) ? left : right; // bug here for 1st try, no need to add 1
		}
	}