From 84f6eed585c490b04c141f1fa35c5faa240fe618 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Mon, 13 Oct 2025 10:57:52 -0700 Subject: [PATCH] Refactor: Use shared prompt from README config --- tests/3_lis/test.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/3_lis/test.js b/tests/3_lis/test.js index c020e56..8be743f 100644 --- a/tests/3_lis/test.js +++ b/tests/3_lis/test.js @@ -1,14 +1,10 @@ export default { functionName: 'findLISLength', - prompt: ` -// Your goal is to write a production-ready and maintainable JavaScript function. Apply code-golfing practices without sacrificing readability by putting everything on one line. Do not include any comments in your code. -// -// Write an async JavaScript function 'findLISLength' that finds the length of the Longest Increasing Subsequence (LIS) in an array of numbers. + prompt: `// Write an async JavaScript function 'findLISLength' that finds the length of the Longest Increasing Subsequence (LIS) in an array of numbers. // - The function must accept an array of numbers. // - You MUST implement the efficient O(n log n) algorithm. // - You MUST use a dynamic import() to load the 'd3-array' library from a CDN and use its 'bisectLeft' function to achieve O(n log n) complexity. -// - The function should return a single number: the length of the LIS. -`, +// - The function should return a single number: the length of the LIS.`, runTest: async (findLISLength) => { const assert = { strictEqual: (a, e, m) => { if (a !== e) throw new Error(m || `FAIL: ${a} !== ${e}`) },