Skip to content

feat: add LCS string reconstruction using DP backtracking - #14472

Closed
GSuryaP wants to merge 2 commits into
TheAlgorithms:masterfrom
GSuryaP:feature/lcs-reconstruction
Closed

GSuryaP wants to merge 2 commits into
TheAlgorithms:masterfrom
GSuryaP:feature/lcs-reconstruction

Conversation

@GSuryaP

@GSuryaP GSuryaP commented Mar 28, 2026

Copy link
Copy Markdown

Closes #14465

What this PR does

Adds longest_common_subsequence_string() to reconstruct and return
the actual LCS string using DP backtracking, complementing the existing
length-only implementation.

Checklist

  • Docstring added
  • Type hints added
  • Doctests added and passing
  • Ruff lint passing

@algorithms-keeper algorithms-keeper Bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Mar 28, 2026
@cclauss

cclauss commented Oct 1, 2026

Copy link
Copy Markdown
Member

Clearing all open pull requests to prepare for Hacktoberfest 2026 -- https://hacktoberfest.com

@cclauss cclauss closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add implementation to print longest common subsequence (LCS)

2 participants