Remove unnecessary code (#4141)

This commit is contained in:
Saurabh Rahate
2023-04-03 20:05:59 +05:30
committed by GitHub
parent 805f09850c
commit ad72c28d91
64 changed files with 125 additions and 322 deletions

View File

@ -112,7 +112,7 @@ public class RegexMatching {
return true;
}
if (strg[svidx][pvidx] != 0) {
return strg[svidx][pvidx] == 1 ? false : true;
return strg[svidx][pvidx] != 1;
}
char chs = src.charAt(svidx);
char chp = pat.charAt(pvidx);
@ -127,7 +127,7 @@ public class RegexMatching {
} else {
ans = false;
}
strg[svidx][pvidx] = ans == false ? 1 : 2;
strg[svidx][pvidx] = ans ? 2 : 1;
return ans;
}