Challenge: Last Digit of the Fibonacci Number

Solve the Last Digit of the Fibonacci Number Problem.

We'll cover the following

Problem


Last Digit of the Fibonacci Number Problem

Compute the last digit of the nn-th Fibonacci number.

Input: An integer nn.

Output: The last digit of the nn-th Fibonacci number.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.