10 marksAbstract Data Types (ADTs)
CAPE Computer Science Unit 2 · 2009 · Paper 2 · Question 1(b)
An algorithm processes a postfix expression expr with n characters using a stack stk.
Assuming stk is initially empty, determine the output of the provided algorithm when n is 9 and expr is '923*-82/+', and draw the stack on each iteration of the for loop.
The mark scheme is shown once you've answered.
Practise this question