Maximum Palindromes

  • + 0 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