Skip to main content
A-LevelComputer ScienceData types and structures9618/33 · Oct/Nov 2023 · Q99 Marks

Write the infix expression for this Reverse Polish Notation (RPN) expression: 52 - 5 4 + * 9 /

  1. (a)(i)Write the infix expression for this Reverse Polish Notation (RPN) expression: 52 - 5 4 + * 9 /[2]
  2. (a)(ii)Show how the contents of the following stack will change as the RPN expression in part (a)(i) is evaluated.[4]
  3. (b)Explain how a stack can be used to evaluate RPN expressions.[3]

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2023). The mark or mark type is shown in brackets.

  1. [1] (5 – 2)
  2. [1] * (5 + 4) / 9
  3. [2] Final correct expression (5 – 2) * (5 + 4) / 9
  4. [1] One mark per ring (Max 4) First circle: 3 Second circle: 9 Third circle: 27 Fourth circle: 3
  5. [1] MP1 Evaluate the RPN expression from left to right
  6. [1] MP2 Push each element of the RPN expression onto the stack in order until an operator is reached
  7. [1] MP3 Pop the last two elements from the stack and apply the operator
  8. [1] MP4 Push the result of the operation onto the stack
  9. [1] MP5 Repeat the process until the whole expression is evaluated.

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Data types and structures, A-Level Computer Science (syllabus 9618). Structured question, 9 marks.
Source
A-Level Computer Science, Oct/Nov 2023 Paper 3 Variant 3, question 9.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep