mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 16:47:55 +00:00
Docs: Update Gemini benchmark results
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
const findLISLength = async nums => {
|
||||
const { bisectLeft } = await import('https://esm.sh/d3-array')
|
||||
const findLISLength = async (arr) => {
|
||||
if (!arr?.length) return 0
|
||||
const { bisectLeft } = await import('https://cdn.jsdelivr.net/npm/d3-array@3/+esm')
|
||||
const tails = []
|
||||
for (const n of nums) tails[bisectLeft(tails, n)] = n
|
||||
for (const n of arr) {
|
||||
const i = bisectLeft(tails, n)
|
||||
i < tails.length ? tails[i] = n : tails.push(n)
|
||||
}
|
||||
return tails.length
|
||||
}
|
||||
export default findLISLength;
|
||||
Reference in New Issue
Block a user