bug in "Interleaving String"
imley opened this issue · 2 comments
imley commented
In such case: _s1 = "b", s2 = "acca", s3 = "abcba"_, it would return true.
This is related to:
for (int i = 1; i <= N; ++i)
dp[i][0] = s2[i-1] == s3[i-1];
for (int j = 1; j <= M; ++j)
dp[0][j] = s1[j-1] == s3[j-1];
AnnieKim commented
Thank you so much for your bug report. Yes, there is a problem. I have fixed the bug. Could you please check it again? Thank you.
imley commented
Yeah, this should have fix it:)
Thanks for sharing us your solutions.