mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 04:56:46 +08:00
49 lines
4.1 KiB
JSON
49 lines
4.1 KiB
JSON
{
|
|
"data": {
|
|
"question": {
|
|
"questionId": "2740",
|
|
"questionFrontendId": "2632",
|
|
"categoryTitle": "JavaScript",
|
|
"boundTopicId": 2222271,
|
|
"title": "Curry",
|
|
"titleSlug": "curry",
|
|
"content": null,
|
|
"translatedTitle": "柯里化",
|
|
"translatedContent": null,
|
|
"isPaidOnly": true,
|
|
"difficulty": "Medium",
|
|
"likes": 17,
|
|
"dislikes": 0,
|
|
"isLiked": null,
|
|
"similarQuestions": "[{\"title\": \"Memoize\", \"titleSlug\": \"memoize\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u8bb0\\u5fc6\\u51fd\\u6570\", \"isPaidOnly\": false}, {\"title\": \"Memoize II\", \"titleSlug\": \"memoize-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u8bb0\\u5fc6\\u51fd\\u6570 II\", \"isPaidOnly\": false}]",
|
|
"contributors": [],
|
|
"langToValidPlayground": null,
|
|
"topicTags": [],
|
|
"companyTagStats": null,
|
|
"codeSnippets": null,
|
|
"stats": "{\"totalAccepted\": \"2.6K\", \"totalSubmission\": \"3.2K\", \"totalAcceptedRaw\": 2632, \"totalSubmissionRaw\": 3174, \"acRate\": \"82.9%\"}",
|
|
"hints": [
|
|
"You can access the count of parameters expected to passed into a function with \"fn.length\".",
|
|
"You can use recursion. If the length of params passed is equal to fn.length, you are done. Just pass those params to fn. Otherwise return a function that is includes the previous passed params plus the new params. The new function should contain a recursive call to curry()."
|
|
],
|
|
"solution": null,
|
|
"status": null,
|
|
"sampleTestCase": "function sum(a, b, c) { return a + b + c; }\n[[1],[2],[3]]",
|
|
"metaData": "{\n \"name\": \"curry\",\n \"params\": [\n {\n \"name\": \"fn\",\n \"type\": \"string\"\n },\n {\n \"type\": \"integer[][]\",\n \"name\": \"inputs\"\n }\n ],\n \"return\": {\n \"type\": \"string\"\n },\n \"languages\": [\n \"javascript\",\n \"typescript\"\n ],\n \"manual\": true\n}",
|
|
"judgerAvailable": true,
|
|
"judgeType": "large",
|
|
"mysqlSchemas": [],
|
|
"enableRunCode": true,
|
|
"envInfo": "{\"javascript\":[\"JavaScript\",\"<p>\\u7248\\u672c\\uff1a<code>Node.js 22.14.0<\\/code><\\/p>\\r\\n\\r\\n<p>\\u60a8\\u7684\\u4ee3\\u7801\\u5728\\u6267\\u884c\\u65f6\\u5c06\\u5e26\\u4e0a <code>--harmony<\\/code> \\u6807\\u8bb0\\u6765\\u5f00\\u542f <a href=\\\"http:\\/\\/node.green\\/\\\" target=\\\"_blank\\\">\\u65b0\\u7248ES6\\u7279\\u6027<\\/a>\\u3002<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/datastructures-js.info\\/docs\\\" target=\\\"_blank\\\"> datastructures-js <\\/a>\\u5e93\\u6240\\u63d0\\u4f9b\\u7684\\u6570\\u636e\\u7ed3\\u6784\\u3002<\\/p>\"],\"typescript\":[\"TypeScript\",\"<p>TypeScript 5.7.3<\\/p>\\r\\n\\r\\n<p>Compile Options: --alwaysStrict --strictBindCallApply --strictFunctionTypes --target ES2024<\\/p>\\r\\n\\r\\n<p><a href=\\\"https:\\/\\/lodash.com\\\" target=\\\"_blank\\\">lodash.js<\\/a> \\u5e93\\u5df2\\u7ecf\\u9ed8\\u8ba4\\u88ab\\u5305\\u542b\\u3002<\\/p>\\r\\n\\r\\n<p> \\u60a8\\u53ef\\u4f7f\\u7528 <a href=\\\"https:\\/\\/datastructures-js.info\\/docs\\\" target=\\\"_blank\\\"> datastructures-js <\\/a>\\u5e93\\u6240\\u63d0\\u4f9b\\u7684\\u6570\\u636e\\u7ed3\\u6784\\u3002<\\/p>\"]}",
|
|
"book": null,
|
|
"isSubscribed": false,
|
|
"isDailyQuestion": false,
|
|
"dailyRecordStatus": null,
|
|
"editorType": "CKEDITOR",
|
|
"ugcQuestionId": null,
|
|
"style": "LEETCODE",
|
|
"exampleTestcases": "function sum(a, b, c) { return a + b + c; }\n[[1],[2],[3]]\nfunction sum(a, b, c) { return a + b + c; }\n[[1,2],[3]]\nfunction sum(a, b, c) { return a + b + c; }\n[[],[],[1,2,3]]\nfunction life() { return 42; }\n[[]]",
|
|
"__typename": "QuestionNode"
|
|
}
|
|
}
|
|
} |