1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>如果一个由&nbsp;<code>&#39;0&#39;</code> 和 <code>&#39;1&#39;</code>&nbsp;组成的字符串,是以一些 <code>&#39;0&#39;</code>(可能没有 <code>&#39;0&#39;</code>)后面跟着一些 <code>&#39;1&#39;</code>(也可能没有 <code>&#39;1&#39;</code>)的形式组成的,那么该字符串是&nbsp;<strong>单调递增&nbsp;</strong>的。</p>\n\n<p>我们给出一个由字符 <code>&#39;0&#39;</code> 和 <code>&#39;1&#39;</code>&nbsp;组成的字符串 <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>,我们可以将任何&nbsp;<code>&#39;0&#39;</code> 翻转为&nbsp;<code>&#39;1&#39;</code>&nbsp;或者将&nbsp;<code>&#39;1&#39;</code>&nbsp;翻转为&nbsp;<code>&#39;0&#39;</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>&nbsp;<strong>单调递增&nbsp;</strong>的最小翻转次数。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>s =<strong> </strong>&quot;00110&quot;\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>&quot;010110&quot;\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>&quot;00011000&quot;\n<strong>输出:</strong>2\n<strong>解释:</strong>我们翻转得到 00000000。\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;= 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> 中只包含字符&nbsp;<code>&#39;0&#39;</code>&nbsp;和&nbsp;<code>&#39;1&#39;</code></li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p><meta charset=\"UTF-8\" />注意:本题与主站 926&nbsp;题相同:&nbsp;<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,