Problem 2

Add solution to problem 2