Suppose that it takes \(3 \cdot 10^9\) seconds to examine each key in a list. If there are \(n\) keys and we search through them in order until we find the right one, find
- the worst-case complexity
Worst case is \(n \cdot 3 \cdot 10^{-9}\) seconds
- the average-case complexity
Average case is \(\frac{n+1}{2} \cdot 3 \cdot 10^{-9}\) seconds