sir,
where iām doing mistake in this code?
Palindrome queries
hey @akash92y do not define dp[1000][1000]={-1} directly instead use a memset function or for loop function to initialize all values with -1.
giving all values -1 directly in 2d array can cause error sometimes.
1 Like