LeetCode—72. Edit Distance

LeetCode—72. Edit Distance 题目 https://leetcode.com/problems/edit-distance/description/ NLP中的文本编辑距离问题。将字符串word1转换为word2最小需要几步,只能使用插入、删除、替换三种操作。 思路及解法 对于字符串处理的问题,十有八九是动态规规划的问题,这道题也是。 维护一个二维数组dp[i][j]表示w
相关文章
相关标签/搜索