You are viewing a single comment's thread. Return to all comments →
for (int i = 0; i <= n; i++) { for (int j = 0; j < A; j++) { cnt[i][j] += cnt[i - 1][j]; } }
cnt[i][j] += cnt[i - 1][j]; in this line what happen when i=0; cnt[0][j]+=cnt[-1][j] as it has a index -1 does it make any sence
it is a editorial solution
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Palindromes
You are viewing a single comment's thread. Return to all comments →
cnt[i][j] += cnt[i - 1][j]; in this line what happen when i=0; cnt[0][j]+=cnt[-1][j] as it has a index -1 does it make any sence
it is a editorial solution