mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 21:46:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>你是产品经理,目前正在带领一个团队开发新的产品。不幸的是,你的产品的最新版本没有通过质量检测。由于每个版本都是基于之前的版本开发的,所以错误的版本之后的所有版本都是错的。</p>\n\n<p>假设你有 <code>n</code> 个版本 <code>[1, 2, ..., n]</code>,你想找出导致之后所有版本出错的第一个错误的版本。</p>\n\n<p>你可以通过调用 <code>bool isBadVersion(version)</code> 接口来判断版本号 <code>version</code> 是否在单元测试中出错。实现一个函数来查找第一个错误的版本。你应该尽量减少对调用 API 的次数。</p>\n \n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 5, bad = 4\n<strong>输出:</strong>4\n<strong>解释:</strong>\n<code>调用 isBadVersion(3) -> false \n调用 isBadVersion(5) -> true \n调用 isBadVersion(4) -> true</code>\n<code>所以,4 是第一个错误的版本。</code>\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 1, bad = 1\n<strong>输出:</strong>1\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= bad <= n <= 2<sup>31</sup> - 1</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 641,
|
||||
"likes": 644,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Find First and Last Position of Element in Sorted Array\", \"titleSlug\": \"find-first-and-last-position-of-element-in-sorted-array\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5728\\u6392\\u5e8f\\u6570\\u7ec4\\u4e2d\\u67e5\\u627e\\u5143\\u7d20\\u7684\\u7b2c\\u4e00\\u4e2a\\u548c\\u6700\\u540e\\u4e00\\u4e2a\\u4f4d\\u7f6e\"}, {\"title\": \"Search Insert Position\", \"titleSlug\": \"search-insert-position\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u641c\\u7d22\\u63d2\\u5165\\u4f4d\\u7f6e\"}, {\"title\": \"Guess Number Higher or Lower\", \"titleSlug\": \"guess-number-higher-or-lower\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u731c\\u6570\\u5b57\\u5927\\u5c0f\"}]",
|
||||
@@ -125,7 +125,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"296.5K\", \"totalSubmission\": \"658.9K\", \"totalAcceptedRaw\": 296453, \"totalSubmissionRaw\": 658926, \"acRate\": \"45.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"298K\", \"totalSubmission\": \"662.1K\", \"totalAcceptedRaw\": 297963, \"totalSubmissionRaw\": 662084, \"acRate\": \"45.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user