s9e/shortest-common-superstring

Shortest common superstring generator

Maintainers

Package info

github.com/s9e/ShortestCommonSuperstring

Homepage

pkg:composer/s9e/shortest-common-superstring

Statistics

Installs: 18

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.1.0 2019-11-05 15:06 UTC

This package is auto-updated.

Last update: 2026-03-11 23:36:23 UTC


README

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