mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
12 lines
305 B
JavaScript
12 lines
305 B
JavaScript
async function findLISLength(arr) {
|
|
const d3 = await import('https://esm.sh/d3-array@3.2.4');
|
|
const tails = [];
|
|
for (const num of arr) {
|
|
const i = d3.bisectLeft(tails, num);
|
|
tails[i] = num;
|
|
}
|
|
return tails.length;
|
|
}
|
|
export default findLISLength;
|
|
// Generation time: 3.865s
|
|
// Result: PASS
|