CMPS 144 Spring 2019
Mid-term test preview
You can expect the following kinds of problems on the test:
- Evalute an FPAE using a pair of stacks.
- Perform a breadth-first search of a directed graph
using a queue.
- Given an array-based or reference-based representation
of a stack or queue, and operations performed upon it,
show how the representation would change.
- Given a recursive method, "execute" it and report
its effects (or the result it returns).
- Given a recursive method, formulate a recurrence relation
describing its "running time".
- Given a recurrence relation (describing some recursive
algorithm's running time), find a "closed form" solution
using the repeated substitution method.
- Given a relatively simple task that can be solved
recursively, develop a recursive method that does so.
- Given code segments involving (probably nested) loops,
determine the number of iterations as a function of
some natural number N describing input size.
- Given some task to carry out, and a loop invariant to
guide you, develop code to solve the problem in a
manner consistent with the given loop invariant.