Move cached answer outside of climbStairs() so the array is not constructed every call.