mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个字符串 <code>s</code>,统计并返回具有相同数量 <code>0</code> 和 <code>1</code> 的非空(连续)子字符串的数量,并且这些子字符串中的所有 <code>0</code> 和所有 <code>1</code> 都是成组连续的。</p>\n\n<p>重复出现(不同位置)的子串也要统计它们出现的次数。</p>\n \n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"00110011\"\n<strong>输出:</strong>6\n<strong>解释:</strong>6 个子串满足具有相同数量的连续 1 和 0 :\"0011\"、\"01\"、\"1100\"、\"10\"、\"0011\" 和 \"01\" 。\n注意,一些重复出现的子串(不同位置)要统计它们出现的次数。\n另外,\"00110011\" 不是有效的子串,因为所有的 0(还有 1 )没有组合在一起。</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"10101\"\n<strong>输出:</strong>4\n<strong>解释:</strong>有 4 个子串:\"10\"、\"01\"、\"10\"、\"01\" ,具有相同数量的连续 1 和 0 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s[i]</code> 为 <code>'0'</code> 或 <code>'1'</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 446,
|
||||
"likes": 451,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Encode and Decode Strings\", \"titleSlug\": \"encode-and-decode-strings\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5b57\\u7b26\\u4e32\\u7684\\u7f16\\u7801\\u4e0e\\u89e3\\u7801\"}]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"57.9K\", \"totalSubmission\": \"91K\", \"totalAcceptedRaw\": 57875, \"totalSubmissionRaw\": 91036, \"acRate\": \"63.6%\"}",
|
||||
"stats": "{\"totalAccepted\": \"59K\", \"totalSubmission\": \"92.8K\", \"totalAcceptedRaw\": 59034, \"totalSubmissionRaw\": 92770, \"acRate\": \"63.6%\"}",
|
||||
"hints": [
|
||||
"How many valid binary substrings exist in \"000111\", and how many in \"11100\"? What about \"00011100\"?"
|
||||
],
|
||||
|
Reference in New Issue
Block a user