Adding problem 6 solution.
Adding solution to problem 7.