All perf tests are failing

The first approach I took was recursion + memoization. (This failed)
The current approach is iterative but it’s still failing.
Language: C++

Thank you.

Hi Sukhdeep,

You have forgotten to take mod 1000000007 at every step.

Thank you! this worked :slight_smile:

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.