Plz correct this code

@devwrath1999
dp[i]=dp[i]+1; line 38
dp[i]=0; line 42
instead of j use i