Tree Transversals Flashcards

1
Q

Depth Transversal

A

Starts at the root and prioritises visiting all nodes in a subtree before moving to sibling nodes

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

Breadth-First Transversal

A

Starts at the root and visits all nodes at a given level before proceeding to the next level. The order of visiting nodes within a level is not strictly defined.

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

Pre-Order Transversal

A

VLR

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

In-Order Transversal

A

LVR

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

Post-Order Transversal

A

LRV

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

What is the significance of Visits?

A

Merely visiting nodes is insufficient; the action performed during the “visit” is crucial. Choosing the right traversal type and “visit” operation allows for the efficient execution of various tasks on the tree data structure.

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