Skip to content

Commit 85ff363

Browse files
committed
refactor: remove useless parentheses
1 parent 9d2096a commit 85ff363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/thealgorithms/dynamicprogramming/DamerauLevenshteinDistance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private static int computeMinimumCost(int[][] dp, int i, int j, int lastMatchRow
178178
int substitution = dp[i][j] + cost;
179179
int insertion = dp[i + 1][j] + 1;
180180
int deletion = dp[i][j + 1] + 1;
181-
int transposition = dp[lastMatchRow][lastMatchCol] + (i - lastMatchRow - 1) + 1 + (j - lastMatchCol - 1);
181+
int transposition = dp[lastMatchRow][lastMatchCol] + i - lastMatchRow - 1 + 1 + j - lastMatchCol - 1;
182182

183183
return Math.min(Math.min(substitution, insertion), Math.min(deletion, transposition));
184184
}

0 commit comments

Comments
 (0)