in reply to Simple String Alignment
It looks to me that all you need is the standard Needleman-Wunsch algorithm: apply it n times to align your query sequence against all the sequences in $hash, read off the sequence whose best alignment has the longest gap, and then use NW again to align this maximal-gap sequence against the remaining n-1 sequences in $hash.
the lowliest monk
|
|---|