The S-W algorithm performs in local sequence alignment for determining two similar regions between two strings nucleotide sequences or protein sequence.
Instead of looking for entire sequence, S-W algorithm compares sequence of all possible lengths and optimizes similarity length.