![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
binary search
文章平均质量分 77
伊萨卡钢琴家
这个作者很懒,什么都没留下…
展开
-
Leetcode 33. Search in Rotated Sorted Array
Leetcode 33. Search in Rotated Sorted Array question: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are原创 2016-01-24 05:08:13 · 268 阅读 · 0 评论 -
Leetcode 81. Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the原创 2016-01-24 05:22:49 · 253 阅读 · 0 评论 -
Leetcode 74. Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer of each原创 2016-01-24 05:29:47 · 228 阅读 · 0 评论 -
Leetcode 34. Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found原创 2016-01-28 04:44:51 · 212 阅读 · 0 评论