
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 · 298 阅读 · 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 · 299 阅读 · 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 · 265 阅读 · 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 · 252 阅读 · 0 评论