SLR 26/ Algorithms Flashcards

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

Name the 3 traversal algorithms

A

Pre-Oder traversal
In-Order traversal
Post-Order traversal

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

purpose of Pre-Oder traversal

A

Copying a tree

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

purpose of In-Order traversal

A

If applied to a binary search tree it will output the contents in ascending order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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