Skip to content

Add: Implementation for printing LCS#2761

Open
RAJ8664 wants to merge 1 commit into
keon:mainfrom
RAJ8664:Print_LCS
Open

Add: Implementation for printing LCS#2761
RAJ8664 wants to merge 1 commit into
keon:mainfrom
RAJ8664:Print_LCS

Conversation

@RAJ8664

@RAJ8664 RAJ8664 commented Jun 11, 2026

Copy link
Copy Markdown
  • Added print_any_longest_common_subsequence.py to efficiently compute and return any one LCS between two strings using dynamic programming.

  • Added print_all_longest_common_subsequence.py to compute all distinct LCSs between two strings, using a combination of dynamic programming and backtracking with memoization.

NOTE: The tests file for both the implementation are not included, however the implemented solutions are tested and accepted on coding platforms. For reference i have attached the screenshot.

screenshot-2026-06-11_17-29-04 screenshot-2026-06-11_17-37-28

Fixes #2747

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.

Name of file does not match with the algorithm implemented in that file.

1 participant