Fix a definition.

This commit is contained in:
krahets
2023-08-27 00:50:18 +08:00
parent debf42b189
commit 9731a46d67
85 changed files with 167 additions and 159 deletions

View File

@@ -88,7 +88,7 @@ func editDistanceDP(s: String, t: String) -> Int {
return dp[n][m]
}
/* */
/* */
func editDistanceDPComp(s: String, t: String) -> Int {
let n = s.utf8CString.count
let m = t.utf8CString.count
@@ -140,7 +140,7 @@ enum EditDistance {
res = editDistanceDP(s: s, t: t)
print("\(s) 更改为 \(t) 最少需要编辑 \(res)")
//
//
res = editDistanceDPComp(s: s, t: t)
print("\(s) 更改为 \(t) 最少需要编辑 \(res)")
}