Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
·
24 lines (18 loc) · 595 Bytes

File metadata and controls

executable file
·
24 lines (18 loc) · 595 Bytes

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