Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lachenmayer/longest-common-subsequence
Finds the longest common subsequence of two strings, and the diff between them.
https://github.com/lachenmayer/longest-common-subsequence
Last synced: 2 days ago
JSON representation
Finds the longest common subsequence of two strings, and the diff between them.
- Host: GitHub
- URL: https://github.com/lachenmayer/longest-common-subsequence
- Owner: lachenmayer
- Created: 2018-03-14T09:09:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-14T09:15:33.000Z (almost 7 years ago)
- Last Synced: 2024-11-12T20:48:08.919Z (2 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# longest-common-subsequence
Finds the longest common subsequence of two strings, and the diff between them.
```typescript
function lcs(a: string, b: string): { lcs: string, diff: Array }type Diff =
| ['keepOld', number] // index in a
| ['addNew', number] // index in b
| ['removeOld', number] // index in a
```