CC77编辑距离C++(详细解释数组的一切为什么)
链接:
https://www.nowcoder.com/practice/81d7738f954242e5ade5e65ec40e5027?tpId=46&tqId=29106&tPage=1&rp=1&ru=/ta/leetcode&qru=/ta/leetcode/question-ranking
描述and示例:
代码:
class Solution {
public:
int minDistance(string word1, string word2)
{
if (word1.empty() || word2.empty()) return max(word1.size(), word2.size());
int len1 = word1.size();
int len2 = word2.size();
vec
共有 0 条评论