Adding solution for Problem 9