Approach hintTry it first, then revealHide
Translate the definition into a recursive function with base cases 0 and 1, then notice the repeated calls and remove them with memoisation or two running variables.
Translate the definition into a recursive function with base cases 0 and 1, then notice the repeated calls and remove them with memoisation or two running variables.