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

Function newNode

Trees/avltree.c:29–38  ·  view source on GitHub ↗

Create a node

Source from the content-addressed store, hash-verified

27
28// Create a node
29struct Node *newNode(int key)
30{
31 struct Node *node = (struct Node *)
32 malloc(sizeof(struct Node));
33 node->key = key;
34 node->left = NULL;
35 node->right = NULL;
36 node->height = 1;
37 return (node);
38}
39
40// Right rotate
41struct Node *rightRotate(struct Node *y)

Callers 2

bToDLLMethod · 0.70
insertNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected