Answer to Question 30-3

Θ(n).