Skip to content

Commit 6a15d28

Browse files
committed
Runtime: 112 ms (Top 53.69%) | Memory: 46.9 MB (Top 82.53%)
1 parent 2d3b0fb commit 6a15d28

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
// Runtime: 112 ms (Top 53.69%) | Memory: 46.9 MB (Top 82.53%)
12
/**
23
* Definition for a binary tree node.
34
* function TreeNode(val, left, right) {
4-
* this.val = (val===undefined ? 0 : val)
5-
* this.left = (left===undefined ? null : left)
6-
* this.right = (right===undefined ? null : right)
5+
* this.val = (val===undefined ? 0 : val)
6+
* this.left = (left===undefined ? null : left)
7+
* this.right = (right===undefined ? null : right)
78
* }
89
*/
910
/**
1011
* @param {TreeNode} root
1112
* @return {boolean}
1213
*/
1314
var isBalanced = function(root) {
14-
15+
1516
let result=true;
1617
function Dfs(root){
1718
if(!root)return 0;
@@ -23,4 +24,3 @@ var isBalanced = function(root) {
2324
Dfs(root)
2425
return result
2526
};
26-

0 commit comments

Comments
 (0)