Files
javascript-algorithms/src/algorithms/string/longest-common-substring
Oleksii Trekhleb 9bef8de6b1 Add LCS.
2018-04-26 07:03:59 +03:00
..
2018-04-26 07:03:59 +03:00
2018-04-26 07:03:59 +03:00
2018-04-26 07:03:59 +03:00

Longest Common Substring Problem

The longest common substring problem is to find the longest string (or strings) that is a substring (or are substrings) of two or more strings.

Example

The longest common substring of the strings ABABC, BABCA and ABCBA is string ABC of length 3. Other common substrings are A, AB, B, BA, BC and C.

ABABC
  |||
 BABCA
  |||
  ABCBA

References