In problem C editorial I am confused about this statement,
If j = 0 We have “the first 0 characters of "chokudai” if and only if no characters is underlined. There is 1 such combination.
why we are considering a string of length 0 as our base case;
why we can’t we do this, we start with the string lenght of 1, and say
If j = 1 whenever “the first 1 character of "chokudai” matches with the character of str then there is 1 combination else there is no any combination
we update dp[i][1] = 1(if “the first 1 character of "chokudai” matches); else dp[i][1] = 0;
why it is necessay to start with 0 lenght, why not of lengtth 1;
in most of dp problem of string we consider null string, it confuses me to consider the length of 0; please clearfy;
editorial link → C - chokudai - editorial