MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / create

Function create

14. Tree/height_of_a_binary_tree.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 node *left,*right;
16};
17node* create()
18{
19 int x;
20 cin>>x;
21 node *p;
22 p=new node;
23 p->data=x;
24 p->left=NULL;
25// p->right=NULL;
26 if(x==-1)
27 {
28 return 0;
29 }
30 p->left=create();
31 p->right=create();
32 return p;
33}
34int height(node* head){
35 if(head==NULL)
36 return 0;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected