AQA A Level · Computer Science 7517

Reverse Polish: Practice Questions

5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Reverse Polish.

10 questions26 marksFree, no account
Question 1
1 mark

Convert the following Reverse Polish Notation (RPN) expression into its standard infix form:
3 4 + 2 * 7 -

Question 2
1 mark

Which of the following describes a primary advantage of using Reverse Polish Notation (RPN) in computer systems, such as in the implementation of stack-based interpreters?

Question 3
1 mark

Consider an expression tree where the post-order traversal yields the sequence: A B + C D * /. What is the equivalent infix expression, assuming standard algebraic rules apply?

Question 4
1 mark

Which of the following is a primary advantage of using Reverse Polish Notation (RPN) in computer science?

Question 5
1 mark

Which of the following describes the relationship between Post-Order tree traversal and Reverse Polish Notation?

Question 6
2 marks

Convert the following infix expression into Reverse Polish Notation (RPN): \( (5 + 3) \times 2 \).

Write your answer out first, then check it against the worked solution.

Question 7
3 marks

Evaluate the following Reverse Polish Notation expression using a stack-based approach: \( 10 \space 2 \space / \space 3 \space + \).

Write your answer out first, then check it against the worked solution.

Question 8
6 marks

Convert the complex expression \( (A + B) \times (C - D) / E \) into its equivalent Reverse Polish Notation form.

Write your answer out first, then check it against the worked solution.

Question 9
3 marks

A programmer is converting mathematical expressions for a stack-based interpreter.

(a) Convert the following infix expression to Reverse Polish Notation (RPN):
\((7 + 3) \times (10 - 2)\)

(b) State one advantage of using Reverse Polish Notation in computer systems.

Write your answer out first, then check it against the worked solution.

Question 10
7 marks

Convert the RPN expression \(12 \text{ } 3 \text{ } / \text{ } 5 \text{ } 2 \text{ } + \text{ } \times\) back into its infix equivalent.

(a) Show the state of the stack after each operation is performed.
(b) Provide the fully parenthesized infix expression.

Write your answer out first, then check it against the worked solution.

* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.

You've seen the model answer. Now get yours marked.

This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.

Want more questions like these? Get a fresh set on this topic, graded as you go.

Practice More