You are viewing a single comment's thread. Return to all comments →
To explain: use the array to cache when n is in scope, otherwise we just compute the result on the fly.
n
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #14: Longest Collatz sequence
You are viewing a single comment's thread. Return to all comments →
To explain: use the array to cache when
n
is in scope, otherwise we just compute the result on the fly.