Getting mle in last test case

Getting mle in last test case even with c++

I think 10**8 is a way too high for a test case.

Kindly help.

hello @aman89533
yeah the memory constraints for this problem is high.

try to do this in O(1) space (as we do for fibonnaci) i.e use three variable .
use 2 of them to store last two states answers and 3rd to store current state answer.

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.