mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
10 lines
256 B
JavaScript
10 lines
256 B
JavaScript
const findLISLength = async a => {
|
|
const { bisectLeft: b } = await import('https://esm.sh/d3-array')
|
|
const t = []
|
|
for (const v of a) {
|
|
const i = b(t, v)
|
|
i < t.length ? t[i] = v : t.push(v)
|
|
}
|
|
return t.length
|
|
}
|
|
export default findLISLength; |