/cs

Computing the Longest Common Substring

Primary LanguageRustMIT LicenseMIT

cs

Computing the (Longest) Common Substring

Example

use cs::longest_common_substring
let lcs = longest_common_substring(&[
    "ZYABCAGB",
    "BCAGDTZYY",
    "DACAGZZYSC",
    "CAGYZYSAU",
    "CAZYUCAGF",
]);
assert_eq!(lcs, "CAG");