File tree 3 files changed +3
-3
lines changed
solution/0100-0199/0104.Maximum Depth of Binary Tree
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ var maxDepth = function (root) {
194
194
*/
195
195
196
196
function maxDepth(root : TreeNode | null ): number {
197
- if (root == null ) {
197
+ if (root === null ) {
198
198
return 0 ;
199
199
}
200
200
return 1 + Math .max (maxDepth (root .left ), maxDepth (root .right ));
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ var maxDepth = function (root) {
174
174
*/
175
175
176
176
function maxDepth(root : TreeNode | null ): number {
177
- if (root == null ) {
177
+ if (root === null ) {
178
178
return 0 ;
179
179
}
180
180
return 1 + Math .max (maxDepth (root .left ), maxDepth (root .right ));
Original file line number Diff line number Diff line change 13
13
*/
14
14
15
15
function maxDepth ( root : TreeNode | null ) : number {
16
- if ( root == null ) {
16
+ if ( root === null ) {
17
17
return 0 ;
18
18
}
19
19
return 1 + Math . max ( maxDepth ( root . left ) , maxDepth ( root . right ) ) ;
You can’t perform that action at this time.
0 commit comments