Skip to content

Commit dbcbf6e

Browse files
committed
update 104
1 parent 01a8e29 commit dbcbf6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

note/104/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ class Solution {
5454
```java
5555
class Solution {
5656
public int maxDepth(TreeNode root) {
57-
return scan(root, 0);
57+
return maxDepth(root, 0);
5858
}
5959

60-
public int scan(TreeNode root, int depth) {
60+
public int maxDepth(TreeNode root, int depth) {
6161
if (root == null) {
6262
return depth;
6363
}
64-
return Math.max(scan(root.left, depth + 1), scan(root.right, depth + 1));
64+
return Math.max(maxDepth(root.left, depth + 1), maxDepth(root.right, depth + 1));
6565
}
6666
}
6767
```

0 commit comments

Comments
 (0)