Scrolled to bottom fix.
This commit is contained in:
parent
40a292d05e
commit
9bc55e771a
@ -262,22 +262,14 @@ levenshteinDistance(a, b) {
|
|||||||
return millisecondsDifference / 1000;
|
return millisecondsDifference / 1000;
|
||||||
}
|
}
|
||||||
isSubsequence(input, array) {
|
isSubsequence(input, array) {
|
||||||
for (const str of array) {
|
let i = 0, j = 0;
|
||||||
let i = 0;
|
while (i < s.length && j < t.length) {
|
||||||
let j = 0;
|
if (s[i] === t[j]) {
|
||||||
|
i++;
|
||||||
while (i < input.length && j < str.length) {
|
|
||||||
if (input[i] === str[j]) {
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i === input.length) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
j++;
|
||||||
}
|
}
|
||||||
return false;
|
return i === s.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user