So I am implementing using matrix exponentiation … but I keep getting TLE … it should have passed considering the complexity of my code being < 10^8
Here is the code for the same
Getting TLE ... for FastFib
Hey @prabh1601
Your approach is perfect
But the limits in this ques are very tight
Please use the formula for calculating fibs in logn instead
I am not aware of any such formula … can u pls let me knw
Hey @prabh1601
There was some issue with the test cases
It has now been fixed
Please try to submit your code again
Well thanks for the help … much appreciated…!
1 Like
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.