PROBLEM OF THE DAY : 12/02/2024 | Recursive sequence
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-12022024-recursive-sequence/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PROBLEM OF THE DAY : 12/02/2024
Welcome to the daily solving of our PROBLEM OF THE DAY with Karan Mashru. 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 Recursion but also build up problem-solving skills.
In this problem, we are given A function F is defined as follows F(n)= (1) +(2*3) + (4*5*6) ... upto n terms (look at the examples for better clarity). Given an integer n, determine the F(n).
Note: As the answer can be very large, return the answer modulo 109+7.
Example :
Input: n = 5
Output: 365527
Explanation:
F(5) = 1 + 2*3 + 4*5*6 + 7*8*9*10 + 11*12*13*14*15 = 365527.
Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/recursive-sequence1611/1
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK