Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ height
Function
height
CPP/binarytreeuse.cpp:195–201 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
193
}
194
195
int height(binarytree<int>*root)
196
{
197
if(root==NULL)
198
return 0;
199
200
return 1+max(height(root->left),height(root->right));
201
}
202
203
pair<int,int> heightdiameter(binarytree<int>*root)
204
{
Callers
nothing calls this directly
Calls
1
max
Function · 0.50
Tested by
no test coverage detected