banded dynamic programming edit distance