MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / countnodes

Function countnodes

CPP/binarytreeuse.cpp:113–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113int countnodes(binarytree<int> *root)
114{
115 if(root==NULL)
116 return 0;
117
118 return 1 + countnodes(root->left) + countnodes(root->right);
119}
120
121void postoder(binarytree<int>*root)
122{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected