mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 23:08:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定长度分别为 <code>m</code> 和 <code>n</code> 的两个数组,其元素由 <code>0-9</code> 构成,表示两个自然数各位上的数字。现在从这两个数组中选出 <code>k (k <= m + n)</code> 个数字拼接成一个新的数,要求从同一个数组中取出的数字保持其在原数组中的相对顺序。</p>\n\n<p>求满足该条件的最大数。结果返回一个表示该最大数的长度为 <code>k</code> 的数组。</p>\n\n<p><strong>说明: </strong>请尽可能地优化你算法的时间和空间复杂度。</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>\nnums1 = <code>[3, 4, 6, 5]</code>\nnums2 = <code>[9, 1, 2, 5, 8, 3]</code>\nk = <code>5</code>\n<strong>输出:</strong>\n<code>[9, 8, 6, 5, 3]</code></pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>\nnums1 = <code>[6, 7]</code>\nnums2 = <code>[6, 0, 4]</code>\nk = <code>5</code>\n<strong>输出:</strong>\n<code>[6, 7, 6, 0, 4]</code></pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>\nnums1 = <code>[3, 9]</code>\nnums2 = <code>[8, 9]</code>\nk = <code>3</code>\n<strong>输出:</strong>\n<code>[9, 8, 9]</code></pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 458,
|
||||
"likes": 464,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Remove K Digits\", \"titleSlug\": \"remove-k-digits\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u79fb\\u6389 K \\u4f4d\\u6570\\u5b57\"}, {\"title\": \"Maximum Swap\", \"titleSlug\": \"maximum-swap\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6700\\u5927\\u4ea4\\u6362\"}]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"29.3K\", \"totalSubmission\": \"69.4K\", \"totalAcceptedRaw\": 29317, \"totalSubmissionRaw\": 69431, \"acRate\": \"42.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"29.9K\", \"totalSubmission\": \"70.9K\", \"totalAcceptedRaw\": 29919, \"totalSubmissionRaw\": 70943, \"acRate\": \"42.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user