Problem 8 first try. Not solved.
Problem 9 solved.

Using LINQ functionality and .groupBy() method.