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

Function main

CPP/Trees/Diameter_of_tree.cpp:49–60  ·  view source on GitHub ↗

Driver code

Source from the content-addressed store, hash-verified

47
48// Driver code
49int main()
50{
51 struct Node *root = newNode(1);
52 root->left = newNode(2);
53 root->right = newNode(3);
54 root->left->left = newNode(4);
55 root->left->right = newNode(5);
56
57 printf("Diameter is %d\n", diameter(root));
58
59 return 0;
60}

Callers

nothing calls this directly

Calls 2

diameterFunction · 0.85
newNodeFunction · 0.70

Tested by

no test coverage detected