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 65b7854 commit f13af0dCopy full SHA for f13af0d
src/regularExpressionMatching.js
@@ -22,7 +22,7 @@ var isMatchDp = function (s, p) {
22
if (!(temp[i] && temp[i][j])) {
23
let ret = false,
24
firstMatch = false;
25
- temp[i] = [];
+ temp[i] = temp[i] || [];
26
if (j === p.length) {
27
ret = i === s.length;
28
} else {
0 commit comments