• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
March 24, 2024 |1.2K Views
PROBLEM OF THE DAY : 23/03/2024 | Fibonacci series up to Nth term
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Nitin Kaplas. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Tree but also build up problem-solving skills.

In this problem, we are given an integer n, return the fibonacci series till the nth(0-based indexing) term. Since the terms can become very large return the terms modulo 10^9+7.

Example :

Input:
n = 5
Output:
0 1 1 2 3 5
Explanation:
0 1 1 2 3 5 is the Fibonacci series up to the 5th term.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/fibonacci-series-up-to-nth-term/1

Read More