We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 100ce1d commit a71842aCopy full SHA for a71842a
src/main/java/com/fishercoder/solutions/_10.java
@@ -32,9 +32,9 @@ public boolean isMatch(String s, String p) {
32
}
33
boolean[][] dp = new boolean[s.length() + 1][p.length() + 1];
34
dp[0][0] = true;
35
- for (int i = 0; i < p.length(); i++) {//here's the p's length, not s's
+ for (int i = 0; i < p.length(); i++) { //here's the p's length, not s's
36
if (p.charAt(i) == '*' && dp[0][i - 1]) {
37
- dp[0][i + 1] = true;//here's y axis should be i+1
+ dp[0][i + 1] = true; //here's y axis should be i+1
38
39
40
for (int i = 0; i < s.length(); i++) {
0 commit comments