mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-23 05:48:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>搜索旋转数组。给定一个排序后的数组,包含n个整数,但这个数组已被旋转过很多次了,次数不详。请编写代码找出数组中的某个元素,假设数组元素原先是按升序排列的。若有多个相同元素,返回索引值最小的一个。</p>\n\n<p><strong>示例1:</strong></p>\n\n<pre><strong> 输入</strong>: arr = [15, 16, 19, 20, 25, 1, 3, 4, 5, 7, 10, 14], target = 5\n<strong> 输出</strong>: 8(元素5在该数组中的索引)\n</pre>\n\n<p><strong>示例2:</strong></p>\n\n<pre><strong> 输入</strong>:arr = [15, 16, 19, 20, 25, 1, 3, 4, 5, 7, 10, 14], target = 11\n<strong> 输出</strong>:-1 (没有找到)\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li>arr 长度范围在[1, 1000000]之间</li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 84,
|
||||
"likes": 89,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"17.1K\", \"totalSubmission\": \"43.6K\", \"totalAcceptedRaw\": 17087, \"totalSubmissionRaw\": 43632, \"acRate\": \"39.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"18.1K\", \"totalSubmission\": \"46.3K\", \"totalAcceptedRaw\": 18104, \"totalSubmissionRaw\": 46310, \"acRate\": \"39.1%\"}",
|
||||
"hints": [
|
||||
"你能为此改进二分查找吗?",
|
||||
"该算法的运行时间是什么?如果数组有重复,会发生什么?"
|
||||
|
Reference in New Issue
Block a user