Upgrade packages.

This commit is contained in:
Oleksii Trekhleb
2018-07-05 16:30:00 +03:00
parent 58640ee7b5
commit 17ad4dc4d1
14 changed files with 1695 additions and 542 deletions

View File

@ -88,18 +88,18 @@ export default function regularExpressionMatching(string, pattern) {
matchMatrix[rowIndex][columnIndex] = true;
} else if (
(
pattern[patternIndex - 1] === string[stringIndex] ||
pattern[patternIndex - 1] === ANY_CHAR
) &&
matchMatrix[rowIndex - 1][columnIndex] === true
pattern[patternIndex - 1] === string[stringIndex]
|| pattern[patternIndex - 1] === ANY_CHAR
)
&& matchMatrix[rowIndex - 1][columnIndex] === true
) {
matchMatrix[rowIndex][columnIndex] = true;
} else {
matchMatrix[rowIndex][columnIndex] = false;
}
} else if (
pattern[patternIndex] === string[stringIndex] ||
pattern[patternIndex] === ANY_CHAR
pattern[patternIndex] === string[stringIndex]
|| pattern[patternIndex] === ANY_CHAR
) {
/*
* In case if current pattern char is the same as current string char