trees Flashcards

1
Q

What is a tree?

A

A data structure which has a root node, and child nodes connected with branche

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

What is a node?

A

A node is any item in a tree

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

What is an edge?

A

An edge is the connection between two nodes

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

What is the root node?

A

The node which doesn’t have any incoming nodes, at the top of the tree

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

What is a child?

A

Any node which has an incoming edge

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

What is a parent?

A

Any node which has outcoming edges

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

What is a subtree?

A

A section of the tree which consists of a parent and all the children of that parent

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

What is a leaf?

A

A leaf is a node which has no children

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

What is a binary tree?

A

A type of tree in which each node has a maximum of two children

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

What is the purpose of a binary tree?

A

A binary tree is used to search for values quickly.

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