Calculate input size for various algorithms and time constraints.

Chapter 1, problem 1.