5.3 Trees Flashcards

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

What is a parent node?

A

A node in a tree that has children.

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

What is a child node?

A

A node below a parent node.

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

What is a subtree?

A

A parent with children within another parent child relationship.

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

What is a root?

A

Top of the tree

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

What is a leaf?

A

A node with no children.

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

How do you traverse preorder?

A

Put flag on left, traverse from left to right collection flags.

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

How do you traverse inorder?

A

Flag below the node, and collect the flags left to right.

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

How do you post order traversal?

A

Flag on the right of the node. Collect flags left to right.

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

What is breadth order tree traversal?

A

Left to right layer by later
starting from root.

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