s9e/shortest-common-superstring

最短公共超字符串生成器

2.1.0 2019-11-05 15:06 UTC

This package is auto-updated.

Last update: 2024-09-11 20:10:14 UTC


README

s9e\ShortestCommonSuperstring接受一系列字符串,并返回一个包含所有给定输入的单一字符串。该实现使用贪心近似算法。

Build Status Code Coverage Scrutinizer Code Quality

用法

$scs = new s9e\ShortestCommonSuperstring\ShortestCommonSuperstring;
echo $scs->getShortest(['abb', 'bba', 'bbb']);
abbba