Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ getHeight
Function
getHeight
javascript/0110-balanced-binary-tree.js:32–37 ·
view source on GitHub ↗
(root)
Source
from the content-addressed store, hash-verified
30
};
31
32
const
getHeight = (root) => {
33
const
isBaseCase = root === null;
34
if
(isBaseCase)
return
0;
35
36
return
dfs(root);
37
};
38
39
var
dfs = (root) => {
40
const
left = getHeight(root.left);
Callers
2
isAcceptableHeight
Function · 0.70
dfs
Function · 0.70
Calls
1
dfs
Function · 0.70
Tested by
no test coverage detected