Skip to content

Shortest common superstring generator using a greedy approximation algorithm.

License

Notifications You must be signed in to change notification settings

s9e/ShortestCommonSuperstring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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