HELL NACA 2019

Can anyone please share a brief approach of this problem. I was trying to solve it using DP but i think i will get TLE as the constraints are big enough.

2 Likes

See the Method 4 O(log n) approach to solve the problem.

In this problem

do `print fib(n+1)`

2 Likes

Thanks a lot brother

1 Like