Did problem 4 in c#. Removed my old implementation in python