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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the runtime of the size() method for a BinaryTree?

A

O(n)

If you have to traverse the tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the max height of a binary tree?

A

O(n)

If the tree is a glorified linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the minimum height of a binary tree?

A

O(log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly