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

Function get_parent

Trees/Binary_tree_Array.c:9–14  ·  view source on GitHub ↗

funtion to get parent

Source from the content-addressed store, hash-verified

7
8// funtion to get parent
9int get_parent(int index)
10{
11 if(tree[index]!='\0' && index>1 && index<=complete_node) //root has no parent
12 return index/2;
13 return -1;
14}
15
16int get_right_child(int index)
17{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected