SLR 26/ Algorithms Flashcards
1
Q
Name the 3 traversal algorithms
A
Pre-Oder traversal
In-Order traversal
Post-Order traversal
2
Q
purpose of Pre-Oder traversal
A
Copying a tree
3
Q
purpose of In-Order traversal
A
If applied to a binary search tree it will output the contents in ascending order
4
Q
purpose of Post-Order traversal
A
Converting infix expressions to Reverse Polish Notation (RPN)
Producing a postfix expression from an expression tree
Emptying a tree