BinaryTrees Flashcards
1
Q
What is the backing storage of a BinaryTree?
A
Root node r.
Where a node has data, pointers to left and right child nodes, and maybe pointer to its parent node.
2
Q
What is the runtime of the size() method for a BinaryTree?
A
O(n)
If you have to traverse the tree.
3
Q
What is the max height of a binary tree?
A
O(n)
If the tree is a glorified linked list
4
Q
What is the minimum height of a binary tree?
A
O(log n)