mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 10:15:51 +08:00
Merge pull request #740 from bogdandv/master
Update LevenshteinDistance.java
This commit is contained in:
@ -25,7 +25,7 @@ public class LevenshteinDistance {
|
|||||||
distance_mat[0][j] = j;
|
distance_mat[0][j] = j;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < len_a; i++) {
|
for (int i = 0; i < len_a; i++) {
|
||||||
for (int j = 0; i < len_b; j++) {
|
for (int j = 0; j < len_b; j++) {
|
||||||
int cost;
|
int cost;
|
||||||
if (a.charAt(i) == b.charAt(j)) {
|
if (a.charAt(i) == b.charAt(j)) {
|
||||||
cost = 0;
|
cost = 0;
|
||||||
|
Reference in New Issue
Block a user