SillyArrayStack
===============

Suppose we implemented `ArrayStack` with an array `stack` where
`stack[0]` was always the top element instead of the bottom element.
What would the runtime for `push`, `pop`, and `top` be, using DJW's
specification?

a.  O(n) for all
b.  *O(n) for `push` and `pop`, O(1) for `top`*
c.  O(n) for `push` and `top`, O(1) for `pop`
d.  O(1) for `pop` and `top`, O(n) for `push`

Stack sizes
===========

Suppose a stack was implemented using a *doubly-linked* list: a list
where the nodes have references both to the next *and previous* nodes.
What is the big-O bound on the space required for such a stack
containing $n$ elements?

a.  O(1)
b.  O(3)
c.  *O($n$)*
d.  O($3n$)
e.  O($n^2$)

Postfix to infix
================

Translate `3 5 + 7 * 4 2 + *` to infix.

a.  (3 + 5) \* (7 + (4 \* 2))
b.  3 \* (5 + 7) \* (4 + 2)
c.  *((3 + 5) \* 7) \* (4 + 2)*
d.  (((3 + 5) \* 7) \* 4) + 2

Unary operators
===============

A valid postfix expression with only binary operators has *k* operands
and *k - 1* operators. What about an expression with only unary
operators?

a.  *k* operands and *k - 1* (the same as only binary operators)
b.  *k-1* operands and *k* operators
c.  *k* operands and *k* operators
d.  *1 operand and *k* operators*

Evaluate postfix
================

Compute the value of `4 5 + 2 * 4 1 + *`:

a.  21
b.  18
c.  *90*
d.  0
e.  25

