BinaryTrees Flashcards

1
Q

What are the parts of a binary tree?

A

A node – the value.
A leaf – a node whose subtrees are empty.
An internal node – not a leaf.
Root node – node that has no parent.

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

What is a binary search tree?

A

From any node in the tree, the
left subtree contains only values
that come before…
…and the right subtree contains
only values that come after.

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

What is a balanced tree?

A

Same number of nodes in left as right, referred to as bushy.

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

What is an unbalanced tree?

A

More nodes in one subtree, branchy, extreme case is a list!

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