Binary Search
文章平均质量分 57
candy_crush
胡编乱写
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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-08-23 11:09:15 · 202 阅读 · 0 评论 -
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-08-19 18:07:29 · 375 阅读 · 0 评论 -
Search Insert Position 插入位置
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.原创 2016-08-20 09:36:20 · 393 阅读 · 0 评论 -
Find Peak Element
A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, in原创 2016-09-02 22:38:39 · 214 阅读 · 0 评论
分享