Added implementation for problem 3 in golang