Edit distance algorithms.