This C++ source code implements Smith Waterman Algorithm with affine gap penalties. It requires at least one blank line between the two sequences. Ignores input lines with non-alphabetical characters.

The Smith-Waterman algorithm is used for comparing two sequences, typically biological sequences like DNA, RNA, or proteins. It finds the local similarities between the sequences, identifying regions where they match or align.

Imagine you have two sequences of characters (e.g., A, C, G, T for DNA). The algorithm looks for regions in these sequences where they align well, taking into account matches, mismatches, and gaps.

The algorithm produces an optimal local alignment of the two sequences which shows the regions where they match and any gaps that are introduced to achieve this alignment. The final alignment score reflects the similarity between the aligned regions.