Skip to content

Implemented longest common subsequence algorithm #45

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wbira
Copy link

@wbira wbira commented Oct 16, 2018

I want partially resolve #8 by adding implementation of Longest common subsequence

@manrajgrover manrajgrover self-requested a review October 16, 2018 17:04
@remes2000
Copy link
Collaborator

remes2000 commented Jul 19, 2020

Hi, tests that you've written only check response value's length. Once I changed them to check an acctual algorithm result one of tests doesn't pass.

it('should find baba or abab for abaabbaaa and babab', () => {
    const stringA = 'abaabbaaa';
    const stringB = 'babab';

    const result = logestcommonsubsequence(stringA, stringB);
    assert.equal(['baba', 'abab'].indexOf(result) !== -1, true);
  });

I guess the problem is in your readSolution function. Let me know If you want to work on this. If the answer is negative. I'll be more than happy to fix this :)

@remes2000 remes2000 self-requested a review August 1, 2020 15:16
Copy link
Collaborator

@remes2000 remes2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

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

Successfully merging this pull request may close these issues.

Implement String Algorithms
2 participants