Smith-Waterman algorithm with linear memory complexity. Assignment for college.