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

Function insertion

Trees/binarytreetraversal.c:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22 void insertion(struct tnode **node, int data) {
23 if (!*node) {
24 *node = createNode(data);
25 } else if (data < (*node)->data) {
26 insertion(&(*node)->left, data);
27 } else if (data > (*node)->data) {
28 insertion(&(*node)->right, data);
29 }
30 }
31 void postOrder(struct tnode *node) {
32 if (node) {
33 postOrder(node->left);

Callers 1

mainFunction · 0.70

Calls 1

createNodeFunction · 0.85

Tested by

no test coverage detected