Finish EditDistance