Computes the optimal sequence alignment of two strings