You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
longestCommonSubsequenceRecursive: wrong result when strings contain ':' and exponential time when there is no common character #2233
Two bugs in src/algorithms/sets/longest-common-subsequence/longestCommonSubsequenceRecursive.js.
1. Wrong result. The memo key is `${s1}:${s2}` (lines 19 and 30), which is ambiguous when the strings contain :. For example, (':a:a', '::') and (':a', 'a:::') both map to ":a:a:::".
Activity