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