Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -35,9 +35,13 @@ public class LevenshteinDistance {
} else {
cost = 1;
}
distance_mat[i][j]
= minimum(distance_mat[i - 1][j], distance_mat[i - 1][j - 1], distance_mat[i][j - 1])
+ cost;
distance_mat[i][j] =
minimum(
distance_mat[i - 1][j],
distance_mat[i - 1][j - 1],
distance_mat[i][j - 1]
) +
cost;
}
}
return distance_mat[len_a - 1][len_b - 1];
@ -47,7 +51,9 @@ public class LevenshteinDistance {
String a = ""; // enter your string here
String b = ""; // enter your string here
System.out.print("Levenshtein distance between " + a + " and " + b + " is: ");
System.out.print(
"Levenshtein distance between " + a + " and " + b + " is: "
);
System.out.println(calculate_distance(a, b));
}
}