Solution for Problem 4

Added the completed solution for problem 4; updated README