31 int tree_rank = rank + 1;
36 bt->
parent = (tree_rank / 2) - 1;
44 if( ( ( tree_rank * 2 ) - 1 ) < size )
54 if( ( tree_rank * 2 ) < size )
int parent
The rank of the parent.
void Binary_Tree_init(struct Binary_Tree *bt, int rank, int size)
Initialization of a binary tree.
int rank
The rank of the element.
Struct defining a binary tree.
int right_child
The rank of the right child.
void Binary_Tree_release(struct Binary_Tree *bt)
releases a binary tree
int size
The size of the element.
int left_child
The rank of the left child.