Borrow Ideas from Martin Snyder's Solution to Improve my Problem 2 Solution
Solve Problem 25