Added Custom Solution for Problem 6