mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 22:13:28 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给出两个字符串 <code>str1</code> 和 <code>str2</code>,返回同时以 <code>str1</code> 和 <code>str2</code> 作为子序列的最短字符串。如果答案不止一个,则可以返回满足条件的任意一个答案。</p>\n\n<p>(如果从字符串 T 中删除一些字符(也可能不删除,并且选出的这些字符可以位于 T 中的 <strong>任意位置</strong>),可以得到字符串 S,那么 S 就是 T 的子序列)</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入:</strong>str1 = "abac", str2 = "cab"\n<strong>输出:</strong>"cabac"\n<strong>解释:</strong>\nstr1 = "abac" 是 "cabac" 的一个子串,因为我们可以删去 "cabac" 的第一个 "c"得到 "abac"。 \nstr2 = "cab" 是 "cabac" 的一个子串,因为我们可以删去 "cabac" 末尾的 "ac" 得到 "cab"。\n最终我们给出的答案是满足上述属性的最短字符串。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>1 <= str1.length, str2.length <= 1000</code></li>\n\t<li><code>str1</code> 和 <code>str2</code> 都由小写英文字母组成。</li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 90,
|
||||
"likes": 92,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"3.2K\", \"totalSubmission\": \"6.4K\", \"totalAcceptedRaw\": 3221, \"totalSubmissionRaw\": 6376, \"acRate\": \"50.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"3.4K\", \"totalSubmission\": \"6.6K\", \"totalAcceptedRaw\": 3355, \"totalSubmissionRaw\": 6567, \"acRate\": \"51.1%\"}",
|
||||
"hints": [
|
||||
"We can find the length of the longest common subsequence between str1[i:] and str2[j:] (for all (i, j)) by using dynamic programming. We can use this information to recover the longest common supersequence."
|
||||
],
|
||||
|
Reference in New Issue
Block a user