mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-20 02:04:47 +08:00
Many quality of code changes
Removing unused imports, cleaning up (at a base level) code, and removing some package declarations. By no means did I get all of them.
This commit is contained in:
@ -17,8 +17,8 @@ public class Levenshtein_distance{
|
||||
}
|
||||
}
|
||||
private static int calculate_distance(String a, String b){
|
||||
len_a = a.length() + 1;
|
||||
len_b = b.length() + 1;
|
||||
int len_a = a.length() + 1;
|
||||
int len_b = b.length() + 1;
|
||||
int [][] distance_mat = new int[len_a][len_b];
|
||||
for(int i = 0; i < len_a; i++){
|
||||
distance_mat[i][0] = i;
|
||||
|
@ -2,8 +2,7 @@
|
||||
Returns the best obtainable price for a rod of
|
||||
length n and price[] as prices of different pieces */
|
||||
|
||||
public class RodCutting
|
||||
{
|
||||
public class RodCutting {
|
||||
|
||||
private static int cutRod(int price[],int n)
|
||||
{
|
||||
|
Reference in New Issue
Block a user