mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>如果一个由 <code>'0'</code> 和 <code>'1'</code> 组成的字符串,是以一些 <code>'0'</code>(可能没有 <code>'0'</code>)后面跟着一些 <code>'1'</code>(也可能没有 <code>'1'</code>)的形式组成的,那么该字符串是 <strong>单调递增 </strong>的。</p>\n\n<p>我们给出一个由字符 <code>'0'</code> 和 <code>'1'</code> 组成的字符串 <font color=\"#c7254e\" face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"caret-color: rgb(199, 37, 78); font-size: 12.600000381469727px; background-color: rgb(249, 242, 244);\">s</span></font>,我们可以将任何 <code>'0'</code> 翻转为 <code>'1'</code> 或者将 <code>'1'</code> 翻转为 <code>'0'</code>。</p>\n\n<p>返回使 <font color=\"#c7254e\" face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"caret-color: rgb(199, 37, 78); font-size: 12.600000381469727px; background-color: rgb(249, 242, 244);\">s</span></font> <strong>单调递增 </strong>的最小翻转次数。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>s =<strong> </strong>"00110"\n<strong>输出:</strong>1\n<strong>解释:</strong>我们翻转最后一位得到 00111.\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>s =<strong> </strong>"010110"\n<strong>输出:</strong>2\n<strong>解释:</strong>我们翻转得到 011111,或者是 000111。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>s =<strong> </strong>"00011000"\n<strong>输出:</strong>2\n<strong>解释:</strong>我们翻转得到 00000000。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 20000</code></li>\n\t<li><font color=\"#c7254e\" face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"caret-color: rgb(199, 37, 78); font-size: 12.600000381469727px; background-color: rgb(249, 242, 244);\">s</span></font> 中只包含字符 <code>'0'</code> 和 <code>'1'</code></li>\n</ul>\n\n<p> </p>\n\n<p><meta charset=\"UTF-8\" />注意:本题与主站 926 题相同: <a href=\"https://leetcode-cn.com/problems/flip-string-to-monotone-increasing/\">https://leetcode-cn.com/problems/flip-string-to-monotone-increasing/</a></p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 22,
|
||||
"likes": 23,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -150,7 +150,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"6.6K\", \"totalSubmission\": \"9.9K\", \"totalAcceptedRaw\": 6610, \"totalSubmissionRaw\": 9935, \"acRate\": \"66.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6.7K\", \"totalSubmission\": \"10K\", \"totalAcceptedRaw\": 6693, \"totalSubmissionRaw\": 10047, \"acRate\": \"66.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user