Computer Science, Mathematics, Learning, Learning To Code, Code.
any value is not -1 anymore, it means that we have already calculated that fibonacci number already! As mentioned before, much of the rest of the recursive code is still the same since we still need to recursively find the sum of the two previous fibonacci numbers. At the end of the code, we return