Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in "Interleaving String" #14

Closed
imley opened this issue Mar 27, 2014 · 2 comments
Closed

bug in "Interleaving String" #14

imley opened this issue Mar 27, 2014 · 2 comments

Comments

@imley
Copy link

imley commented Mar 27, 2014

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 added a commit that referenced this issue Mar 28, 2014
In such case: s1 = "b", s2 = "acca", s3 = "abcba", it would return true.
@AnnieKim
Copy link
Contributor

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
Copy link
Author

imley commented Mar 28, 2014

Yeah, this should have fix it:)
Thanks for sharing us your solutions.

@imley imley closed this as completed Mar 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants