1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-02 22:13:28 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给出两个字符串&nbsp;<code>str1</code> 和&nbsp;<code>str2</code>,返回同时以&nbsp;<code>str1</code>&nbsp;和&nbsp;<code>str2</code>&nbsp;作为子序列的最短字符串。如果答案不止一个,则可以返回满足条件的任意一个答案。</p>\n\n<p>(如果从字符串 T 中删除一些字符(也可能不删除,并且选出的这些字符可以位于 T 中的&nbsp;<strong>任意位置</strong>),可以得到字符串 S那么&nbsp;S 就是&nbsp;T 的子序列)</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入:</strong>str1 = &quot;abac&quot;, str2 = &quot;cab&quot;\n<strong>输出:</strong>&quot;cabac&quot;\n<strong>解释:</strong>\nstr1 = &quot;abac&quot; 是 &quot;cabac&quot; 的一个子串,因为我们可以删去 &quot;cabac&quot; 的第一个 &quot;c&quot;得到 &quot;abac&quot;。 \nstr2 = &quot;cab&quot; 是 &quot;cabac&quot; 的一个子串,因为我们可以删去 &quot;cabac&quot; 末尾的 &quot;ac&quot; 得到 &quot;cab&quot;。\n最终我们给出的答案是满足上述属性的最短字符串。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>1 &lt;= str1.length, str2.length &lt;= 1000</code></li>\n\t<li><code>str1</code> 和&nbsp;<code>str2</code>&nbsp;都由小写英文字母组成。</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."
],