why is my code not passing all the testcases ? What is wrong with my code? Help me identify me error and rectify it ASAP.
Testcases not passing
hello @D19APPPP0016
use MOD property here as well.
![]()
it should be
dp[i]=(dp[i]%mod -dp[last[str[i-1]]]%mod + mod) %mod;