Solution to problem 11
Solution to problem 12