[NP] leetcode: edit distance