There was an error while loading. Please reload this page.
1 parent aef25c1 commit bf6b1c1Copy full SHA for bf6b1c1
edit distance.py
@@ -21,7 +21,7 @@ def edit(a,b):
21
22
for l in range(1,len_a+1):
23
for m in range(len_b+1):
24
- if len_a==len_b:
+ if a[l-1]==b[m-1]:
25
c[l][m]=min(c[l-1][m]+1,c[l][m-1]+1,c[l-1][m-1])
26
else:
27
c[l][m]=min(c[l-1][m]+1,c[l][m-1]+1,c[l-1][m-1]+1)
0 commit comments