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

Function newNode

CPP/Trees/TopView_of_tree.cpp:17–23  ·  view source on GitHub ↗

function to create a new node

Source from the content-addressed store, hash-verified

15
16// function to create a new node
17Node *newNode(int key)
18{
19 Node *node = new Node();
20 node->left = node->right = NULL;
21 node->data = key;
22 return node;
23}
24
25// function should print the topView of
26// the binary tree

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected