Derivable Behaviors (Theorems)
- If (n = Q.size()) is followed by k push
operations then n + k = Q.size()
- If (n = Q.size()) is followed by k pop
operations then n - k = Q.size()
in particular, k <= n
- The first element pushed onto Q (of those still in Q) is the front of Q
- Q.pop() removes the front element of Q
- Any two queues of type T are isomorphic
|