s9e / ShortestCommonSuperstring

Shortest common superstring generator using a greedy approximation algorithm.
MIT License
0 stars 1 forks source link
scs shortest-common-supersequence shortest-common-superstrings

s9e\ShortestCommonSuperstring takes a list of strings and returns a single string that contains all of the given input. The implementation uses a greedy approximation algorithm.

Build Status Code Coverage Scrutinizer Code Quality

Usage

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