Moved problem 14 solution to a recursive call which eliminates duplicate code.