1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26:46 +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>给定一个字符串 <code>s</code>,计算 <code>s</code> 的 <strong>不同非空子序列</strong> 的个数。因为结果可能很大,所以返回答案需要对<strong> </strong><strong><code>10^9 + 7</code> 取余</strong> 。</p>\n\n<p>字符串的 <strong>子序列</strong> 是经由原字符串删除一些(也可能不删除)字符但不改变剩余字符相对位置的一个新字符串。</p>\n\n<ul>\n\t<li>例如,<code>\"ace\"</code> 是 <code>\"<em><strong>a</strong></em>b<em><strong>c</strong></em>d<em><strong>e</strong></em>\"</code> 的一个子序列,但 <code>\"aec\"</code> 不是。</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"abc\"\n<strong>输出:</strong>7\n<strong>解释:</strong>7 个不同的子序列分别是 \"a\", \"b\", \"c\", \"ab\", \"ac\", \"bc\", 以及 \"abc\"。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"aba\"\n<strong>输出:</strong>6\n<strong>解释:</strong>6 个不同的子序列分别是 \"a\", \"b\", \"ab\", \"ba\", \"aa\" 以及 \"aba\"。\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"aaa\"\n<strong>输出:</strong>3\n<strong>解释:</strong>3 个不同的子序列分别是 \"a\", \"aa\" 以及 \"aaa\"。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= s.length &lt;= 2000</code></li>\n\t<li><code>s</code> 仅由小写英文字母组成</li>\n</ul>\n\n<p>&nbsp;</p>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 115,
"likes": 116,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"5.8K\", \"totalSubmission\": \"13.6K\", \"totalAcceptedRaw\": 5833, \"totalSubmissionRaw\": 13626, \"acRate\": \"42.8%\"}",
"stats": "{\"totalAccepted\": \"6K\", \"totalSubmission\": \"14K\", \"totalAcceptedRaw\": 6014, \"totalSubmissionRaw\": 14042, \"acRate\": \"42.8%\"}",
"hints": [],
"solution": null,
"status": null,