Updates the most recent solution

Recursive is not that efficient.