Skip to content

Commit 8796dee

Browse files
authored
feat: update ts solution to lc problem: No.0104 (#1424)
1 parent 1f02e4a commit 8796dee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

solution/0100-0199/0104.Maximum Depth of Binary Tree/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ var maxDepth = function (root) {
194194
*/
195195

196196
function maxDepth(root: TreeNode | null): number {
197-
if (root == null) {
197+
if (root === null) {
198198
return 0;
199199
}
200200
return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));

solution/0100-0199/0104.Maximum Depth of Binary Tree/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ var maxDepth = function (root) {
174174
*/
175175

176176
function maxDepth(root: TreeNode | null): number {
177-
if (root == null) {
177+
if (root === null) {
178178
return 0;
179179
}
180180
return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));

solution/0100-0199/0104.Maximum Depth of Binary Tree/Solution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
function maxDepth(root: TreeNode | null): number {
16-
if (root == null) {
16+
if (root === null) {
1717
return 0;
1818
}
1919
return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));

0 commit comments

Comments
 (0)