Align two sequences using dynamic programming and backtracking algorithms