What's wrong in this solution

Getting TLE

@Akshay123
hello Akshay,
a) In question it is asked to take modulo but u r not taking anywhere.

b) even after doing adding mod you will get tle because time complexity of this recursive approach is exponential . so to improve ur time complexity u need to use dynamic programming.