Removed the need to clear the memoization array between algorithm runs.