4.3.3 Reverse Polish Notation Flashcards

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

Why do we use the infix notation?

A

It is the more preferable option to humans in terms of readability and comprehension.

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

Which side is the operand?

A

Either side of the opcode.

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

What is reverse Polish notation?

A

A postfix way of writing expressions.

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

Why do we use RPN?

A

To eliminate the need for brackets and confusion over the order of execution.

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

In RPN where does the opcode go?

A

After the the operand in a postfix expression.

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

How do you convert from infix to postfix?

A

By the post order traversal of an expression tree.

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

What else can be used to evaluate a postfix expression?

A

Stacks and and pseudocode.

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

What is the process of using a stack with RPN?

A

The algorithm goes along the array.
Operand is used on the stack.
The opcode causes two items to be popped off the stack.
Results of the operation pushed on the stack.

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