4.3.3 Reverse Polish Notation Flashcards

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

Which of the following is true of RPN:
1. It uses a queue
2. It eliminates the need for brackets
3. It’s based on Graphs

A

It eliminates the need for brackets

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

Which of the following is true of RPN:
1. It uses a queue
2. It eliminates the need for brackets
3. It’s based on Graphs

A

It eliminates the need for brackets

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

Convert to RPN
14 + 6

A

146+

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

Conv. infix to RPN
(12 - 4) x (3 + 5)

A

12 4 - 3 5 + x

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

Conv. RPN to Infix
13 6 + 4 -

A

(13 + 6) - 4

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

Conv. RPN to Infix
13 6 + 4 -

A

(13 + 6) - 4

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

Conv. Infix to RPN
3 (4 - 2) + 9

A

4 2 - 3 x 9 +

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

Conv. RPN to Infix
4 6 7 + -

A

4 - (6 + 7)

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

Which of the following is not an example of where RPN is used:
1. Prescript
2. Bytescode
3. Postscript

A

PreScript

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

Which of the following is not an example of where RPN is used:
1. Prescript
2. Bytescode
3. Postscript

A

PreScript

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

What is the result?
2 8 x 2 4 - x

A
  • 2 8 x 2 4 - x
  • (2 x 8) x (2 - 4)
  • -32
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the result?
4 6 8 – –

A
  • 4 6 8 - -
  • 4 - (6 - 8)
  • 4 - (-2)
  • 6
How well did you know this?
1
Not at all
2
3
4
5
Perfectly