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
- Host: GitHub
- URL: https://github.com/timbo-rafa/python-lcs
- Owner: timbo-rafa
- Created: 2019-12-15T00:41:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-15T00:51:15.000Z (over 5 years ago)
- Last Synced: 2025-01-13T01:11:28.914Z (4 months ago)
- Topics: algorithms, demo, dynamic-programming, hackerrank, python
- Language: Python
- Homepage: https://www.hackerrank.com/challenges/common-child
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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