Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/31 · May/June 2024 · Q59 Marks

Write this Reverse Polish Notation (RPN) in infix form: 5 2 + 9 3 - / 3 *

  1. (a)Write this Reverse Polish Notation (RPN) in infix form: 5 2 + 9 3 - / 3 *[3]
  2. (b)Write this infix expression in RPN: ((7 + 3) - (2 * 8)) / 6[2]
  3. (c)Evaluate this RPN expression: a b - c d + * e / when a = 17, b = 5, c = 7, d = 3 and e = 10 Show the changing contents of the stack as the RPN expression is evaluated.[4]

Mark scheme

Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.

  1. [3] 5(a) One mark per correct term (Max 3)
  2. 5(a) (5 + 2)
  3. 5(a) / (9 - 3)
  4. 5(a) * 3
  5. 5(a) Complete correct answer ((5 + 2) / (9 - 3)) * 3
  6. [2] 5(b) One mark 7 3 +
  7. 5(b) One mark 2 8 * - 6 /
  8. 5(b) Complete answer 7 3 + 2 8 * - 6 /
  9. [4] 5(c) One mark per ring (Max 4)
  10. 5(c) Stack contents: [17]
  11. 5(c) Stack contents: [17, 5]
  12. 5(c) Stack contents: [12]
  13. 5(c) Stack contents: [12, 7]
  14. 5(c) Stack contents: [12, 7, 3]
  15. 5(c) Stack contents: [12, 10]
  16. 5(c) Stack contents: [120]
  17. 5(c) Stack contents: [120, 10]
  18. 5(c) Stack contents: [12]

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
Algorithm design and problem-solving, A-Level Computer Science (syllabus 9618). Structured question, 9 marks.
Source
A-Level Computer Science, May/June 2024 Paper 3 Variant 1, question 5.

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