Ignore case in editDistance()
bug: 3278422 Change-Id: Ibd20488dcec215038970749b181857527311947bmain
parent
baf83886be
commit
9aa20e6ad1
|
@ -206,7 +206,7 @@ public class Utils {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < sl; ++i) {
|
for (int i = 0; i < sl; ++i) {
|
||||||
for (int j = 0; j < tl; ++j) {
|
for (int j = 0; j < tl; ++j) {
|
||||||
if (s.charAt(i) == t.charAt(j)) {
|
if (Character.toLowerCase(s.charAt(i)) == Character.toLowerCase(t.charAt(j))) {
|
||||||
dp[i + 1][j + 1] = dp[i][j];
|
dp[i + 1][j + 1] = dp[i][j];
|
||||||
} else {
|
} else {
|
||||||
dp[i + 1][j + 1] = 1 + Math.min(dp[i][j],
|
dp[i + 1][j + 1] = 1 + Math.min(dp[i][j],
|
||||||
|
|
Loading…
Reference in New Issue