Add solutions for Problem 2.