Nth Fibonacci Memoized Problem

Nth Fibonacci Memoized Problem — ExecCode School DSA Practice

Solve the Nth Fibonacci Memoized problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a whole number N. Your task is to find the N-th Fibonacci number and print it. You may remember earlier answers to make the work faster.

Examples

Input 0; Output 0. Input 5; Output 5

Constraints

1 <= n <= 10^5

Practice Nth Fibonacci Memoized free on ExecCode. Browse DSA problems, topic map, and placement guides.