Add solutions for Problem 3.