https://github.com/gordonlesti/longestcommonsubsequence
PHP Implementation of Longest common subsequence algorithm
https://github.com/gordonlesti/longestcommonsubsequence
longest-common-subsequence php
Last synced: 6 months ago
JSON representation
PHP Implementation of Longest common subsequence algorithm
- Host: GitHub
- URL: https://github.com/gordonlesti/longestcommonsubsequence
- Owner: GordonLesti
- License: mit
- Created: 2019-09-30T16:01:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-17T19:54:05.000Z (about 6 years ago)
- Last Synced: 2025-01-23T15:55:00.545Z (12 months ago)
- Topics: longest-common-subsequence, php
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# LongestCommonSubsequence
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Coverage Status][ico-coveralls]][link-coveralls]
[![Total Downloads][ico-downloads]][link-downloads]
PHP Implementation of Longest common subsequence algorithm that works with UTF-8 input.
## Install
Via Composer
``` bash
$ composer require gordonlesti/longest-common-subsequence
```
## Usage
``` php
use GordonLesti\LongestCommonSubsequence\LongestCommonSubsequence;
```
Calculates the longest common subsequence of both strings and returns the length.
``` php
$lcsDist = LongestCommonSubsequence::lcs("DABDC", "CBDBBAC");
```
## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Testing
``` bash
$ composer test
```
## Security
If you discover any security related issues, please email info@gordonlesti.com instead of using the issue tracker.
## Credits
- [Gordon Lesti][link-author]
- [All Contributors][link-contributors]
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.
[ico-version]: https://img.shields.io/packagist/v/gordonlesti/longest-common-subsequence.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/GordonLesti/LongestCommonSubsequence/master.svg?style=flat-square
[ico-coveralls]: https://img.shields.io/coveralls/GordonLesti/LongestCommonSubsequence/master.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/gordonlesti/longest-common-subsequence.svg?style=flat-square
[link-packagist]: https://packagist.org/packages/gordonlesti/longest-common-subsequence
[link-travis]: https://travis-ci.org/GordonLesti/LongestCommonSubsequence
[link-coveralls]: https://coveralls.io/r/GordonLesti/LongestCommonSubsequence?branch=master
[link-downloads]: https://packagist.org/packages/gordonlesti/longest-common-subsequence
[link-author]: https://gordonlesti.com
[link-contributors]: ../../contributors