Add solution to problem 2
Add test for problem 2