Problem 9: Computer Science Solution