Added solution for Problem 5