An open API service indexing awesome lists of open source software.

https://github.com/timbo-rafa/python-lcs

Longest Common Substring
https://github.com/timbo-rafa/python-lcs

algorithms demo dynamic-programming hackerrank python

Last synced: 2 months ago
JSON representation

Longest Common Substring

Awesome Lists containing this project

README

        

A string is said to be a child of a another string if it can be formed by deleting 0 or more characters from the other string. Given two strings of equal length, what's the longest string that can be constructed such that it is a child of both?

For example, ABCD and ABDC have two children with maximum length 3, ABC and ABD. They can be formed by eliminating either the D or C from both strings. Note that we will not consider ABCD as a common child because we can't rearrange characters and ABCD != ABDC.

#### Hackerrank Problem

https://www.hackerrank.com/challenges/common-child

#### Solution

https://en.wikipedia.org/wiki/Longest_palindromic_substring