Skip to content

Feat : Longest Common Subsequence Implementation using Typescript#173

Merged
raklaptudirm merged 1 commit into
TheAlgorithms:masterfrom
Suryac72:feature-lcs
Oct 5, 2023
Merged

Feat : Longest Common Subsequence Implementation using Typescript#173
raklaptudirm merged 1 commit into
TheAlgorithms:masterfrom
Suryac72:feature-lcs

Conversation

@Suryac72

@Suryac72 Suryac72 commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

I added feature of LCS implementation using tabluation approach in typescript

@Suryac72

Suryac72 commented Oct 4, 2023

Copy link
Copy Markdown
Contributor Author

hi @appgurueu @raklaptudirm , there is some tests falling for quick_select sort algorithm, because of that CI/Tests were falling. My tests were passed in below CI/test

image

@appgurueu

Copy link
Copy Markdown
Contributor

hi @appgurueu @raklaptudirm , there is some tests falling for quick_select sort algorithm, because of that CI/Tests were falling. My tests were passed in below CI/test

We're aware of this. Rak has already PR'd a fix: #174.

const lcs: string[] = [];
while (i > 0 && j > 0) {
if (text1[i - 1] === text2[j - 1]) {
lcs.unshift(text1[i - 1]);

@appgurueu appgurueu Oct 4, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Side note: This is needlessly inefficient (unshifting is linear time, making the reconstruction O(min(n,m)²) where n, m are the lengths of the two strings; it would be more efficient to just push and reverse later before joining), but I don't think it affects the asymptotic time complexity, which should still be O(nm).

@raklaptudirm raklaptudirm merged commit b109436 into TheAlgorithms:master Oct 5, 2023
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.

3 participants