A better alternative in order to find the best possible results would be to use the Smith-Waterman algorithm.
Bolja alternativa za pronalaženje najboljeg mogućeg rešenja bila bi korišćenje Smith-Waterman algoritma.