Binary Search
lviiii
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode Solutions : Search in Rotated Sorted Array
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 given a target value to search. If found in the array return原创 2014-08-18 15:06:00 · 795 阅读 · 0 评论 -
LeetCode Solutions : 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原创 2014-08-26 17:11:28 · 1134 阅读 · 0 评论 -
LeetCode Solutions : 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 fo原创 2014-08-15 14:05:15 · 572 阅读 · 0 评论
分享