1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 07:51:41 +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>a</code>&nbsp;和&nbsp;<code>b</code>,请返回 <em>这两个字符串中 <strong>最长的特殊序列</strong>&nbsp;</em> 的长度。如果不存在,则返回 <code>-1</code>&nbsp;。</p>\n\n<p><strong>「最长特殊序列」</strong>&nbsp;定义如下:该序列为&nbsp;<strong>某字符串独有的最长子序列(即不能是其他字符串的子序列)</strong>&nbsp;。</p>\n\n<p>字符串&nbsp;<code>s</code>&nbsp;的子序列是在从&nbsp;<code>s</code>&nbsp;中删除任意数量的字符后可以获得的字符串。</p>\n\n<ul>\n\t<li>例如,<code>\"abc\"</code> 是 <code>\"aebdc\"</code> 的子序列,因为删除 <code>\"a<em><strong>e</strong></em>b<strong><em>d</em></strong>c\"</code> 中斜体加粗的字符可以得到 <code>\"abc\"</code> 。 <code>\"aebdc\"</code> 的子序列还包括 <code>\"aebdc\"</code> 、 <code>\"aeb\"</code> 和 <code>\"\"</code> (空字符串)。</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong> a = \"aba\", b = \"cdc\"\n<strong>输出:</strong> 3\n<strong>解释:</strong> 最长特殊序列可为 \"aba\" (或 \"cdc\"),两者均为自身的子序列且不是对方的子序列。</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>a = \"aaa\", b = \"bbb\"\n<strong>输出:</strong>3\n<strong>解释:</strong> 最长特殊序列是 \"aaa\" 和 \"bbb\" 。\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>a = \"aaa\", b = \"aaa\"\n<strong>输出:</strong>-1\n<strong>解释:</strong> 字符串 a 的每个子序列也是字符串 b 的每个子序列。同样,字符串 b 的每个子序列也是字符串 a 的子序列。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= a.length, b.length &lt;= 100</code></li>\n\t<li><code>a</code>&nbsp;和&nbsp;<code>b</code>&nbsp;由小写英文字母组成</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 212,
"likes": 213,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Longest Uncommon Subsequence II\", \"titleSlug\": \"longest-uncommon-subsequence-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6700\\u957f\\u7279\\u6b8a\\u5e8f\\u5217 II\"}]",
@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"54.7K\", \"totalSubmission\": \"74K\", \"totalAcceptedRaw\": 54668, \"totalSubmissionRaw\": 74049, \"acRate\": \"73.8%\"}",
"stats": "{\"totalAccepted\": \"55.4K\", \"totalSubmission\": \"75K\", \"totalAcceptedRaw\": 55372, \"totalSubmissionRaw\": 75001, \"acRate\": \"73.8%\"}",
"hints": [],
"solution": null,
"status": null,