Skip to content

Files

Latest commit

f966ef5 · May 21, 2018

History

History
This branch is 13 commits ahead of, 634 commits behind trekhleb/javascript-algorithms:master.

longest-common-substring

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 26, 2018
May 21, 2018
Apr 26, 2018

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