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

Function main

Trees/delete_nodes_BST.cpp:128–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128int main()
129{
130 vector<int>test={8,5,3,6,11,10,9,12};
131 Tree *root=nullptr;
132 for(int i:test)
133 root=root->buildTree(i);
134 cout<<"The tree: ";
135 root->preOrder();
136 root=deleteNode(root,6);
137 cout<<"\nThe tree after deletion: ";
138 root->preOrder();
139}

Callers

nothing calls this directly

Calls 3

preOrderMethod · 0.80
deleteNodeFunction · 0.70
buildTreeMethod · 0.45

Tested by

no test coverage detected