Files
lynchmark/tests/3_lis/outputs/google_gemini-2.5-pro.js
2025-11-13 21:24:36 +00:00

16 lines
299 B
JavaScript

const findLISLength = async (nums) => {
if (!nums?.length) {
return 0;
}
const { bisectLeft } = await import('https://esm.sh/d3-array');
const tails = [];
for (const num of nums) {
tails[bisectLeft(tails, num)] = num;
}
return tails.length;
};
export default findLISLength;