Trees Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a tree?

A

A graph that has no cycles (not possible to loop back around to a previous part of the tree) and is not disconnected

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

What is a rooted tree?

A

A tree with a rooted node from which all edges leading away from that root

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

What is a binary tree?

A

A tree that each node has a maximum of two children

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

What are the advantages of using a binary search tree to store data

A

Values are stored in the tree in order, no matter what order the values are added
The values don’t need to be re-sorted each time a new
value is added
A binary search can be performed easily without needing to sort the values

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