MCPcopy 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
195int 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
203pair<int,int> heightdiameter(binarytree<int>*root)
204{

Callers

nothing calls this directly

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected