donnemartin / donnemartin/interactive-coding-challenges

Solution to the Longest Common Subsequence needs corrections

Open
#209 1 comment 0 reactions 0 assignees View on GitHub
needs-review
Dominant language
Python
Stars
31.8k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Description

The current solution could be spooked with 2 inputs : "ABCDFE" and "FOOBCDBCDE". The logic will create a map that will still end up having the last letter E in sequence.

According to [Wikipedia ](https://en.wikipedia.org/wiki/Longest_common_substring_problem), they are filling in 0 instead of taking the `max (left, above)` for characters that aren't matched.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.