gordonlesti/longest-common-subsequence

v1.0.0 2019-10-17 19:52 UTC

This package is auto-updated.

Last update: 2024-05-18 06:48:41 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Total Downloads

PHP Implementation of Longest common subsequence algorithm that works with UTF-8 input.

Install

Via Composer

$ composer require gordonlesti/longest-common-subsequence

Usage

use GordonLesti\LongestCommonSubsequence\LongestCommonSubsequence;

Calculates the longest common subsequence of both strings and returns the length.

$lcsDist = LongestCommonSubsequence::lcs("DABDC", "CBDBBAC");

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email info@gordonlesti.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.