Binary Tree Flashcards
what is a binary tree
nodes with links to left and right nodes
how to get the height of a tree with N nodes
lg N
what is binary heap
array representation of a heap ordered complete binary tree
nodes in a binary tree must always first be added from which direction
left
what is the rule about parents and children for binary trees
parent’s keys must not be smaller than their children’s keys
when a binary tree is put into a binary representation, what number do the indices start at
1
where is the largest key found in the binary tree array representation
a[1]
what is the first node (largest node) called in a binary tree
root
where is the parent of node k found in array representation of binary tree
k/2
where are the children of node k found in array representation of binary tree
2k (left)
2k+1 (right)
the left subtree of k is empty if
2k > N
the right subtree of k is empty if
2k+1 > N
when is k a leaf node
2k > n
what is a leaf node
a node without isblings
is a binary tree completely sorted
no