Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 552 Bytes

File metadata and controls

29 lines (15 loc) · 552 Bytes

Longest Common Substring

Tags: String, LintCode Copyright, Medium

Question

Problem Statement

Given two strings, find the longest common substring.

Return the length of it.

Notice

The characters in substring should occur continuously in original string. This is different with subsequence.

Example

Given A = "ABCD", B = "CBCE", return 2.

Challenge ****

O(n x m) time and memory.

Work on it later...