Add solution and unit tests for problem 2