Scrolled to bottom fix.

This commit is contained in:
retoor 2025-05-27 12:30:42 +02:00
parent 40a292d05e
commit 9bc55e771a

View File

@ -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;
}