Skip to content

Commit 440218f

Browse files
committed
fix
1 parent 7344bfb commit 440218f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/com/chen/algorithm/znn/tree/test111/Solution.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public int minDepth2(TreeNode root) {
8888
}
8989

9090
if (node.left == null && node.right == null) {
91-
return minDepth;
91+
return minDepth + 1;
9292
}
9393
}
9494
}

0 commit comments

Comments
 (0)