1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-23 05:48:57 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -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": [
"你能为此改进二分查找吗?",
"该算法的运行时间是什么?如果数组有重复,会发生什么?"