CS 2401 Quiz #10

Date: Tuesday, October 26, 2010.
Name: ____________________________________________

1. Show, step-by-step, how to use a stack to compute the value of the postfix expression 23*45*-.

2. Suppose that a queue is implemented as an array of size 3. Show, step-by-step, what will happen if we start with an empty queue, enqueue 1, enqueue 2, dequeue, enqueue 3, enqueue 4, dequeue. Do not forget to indicate which element is the first and which is the last.

3. For extra credit: show, step-by-step, how to use a stack to convert the infix expression 2 * 3 - 4 * 5 into the above postfix form.