![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
#BinarySearch
TechJungle
这个作者很懒,什么都没留下…
展开
-
LeetCode BinarySearch 69. Sqrt(x)
69. Sqrt(x)Implement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative integer.Since the return type is an integer, the decimal digits are truncate...原创 2019-12-24 09:55:20 · 103 阅读 · 0 评论 -
LeetCode BinarySearch 852. Peak Index in a Mountain Array 1095. Find in Mountain Array
852. Peak Index in a Mountain ArrayLet’s call an array A a mountain if the following properties hold:A.length >= 3There exists some 0 < i < A.length - 1 such thatA[0]<A[1]<...A[i−1...原创 2019-12-24 06:18:46 · 110 阅读 · 0 评论 -
LeetCode BinarySearch 162. Find Peak Element
162. Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.The array may co...原创 2019-12-24 05:38:42 · 100 阅读 · 0 评论 -
LeetCode BinarySearch 240. Search a 2D Matrix II
240. Search a 2D Matrix IIWrite 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 in ascending from left t...原创 2019-12-24 05:21:05 · 97 阅读 · 0 评论 -
LeetCode BinarySearch 74 Search a 2D Matrix
74. Search a 2D MatrixWrite 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 firs...原创 2019-12-24 00:52:08 · 72 阅读 · 0 评论 -
Leetcode BinarySearch 302 Smallest Rectangle Enclosing Black Pixels
302. Smallest Rectangle Enclosing Black PixelsAn image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one black ...原创 2019-12-23 13:12:58 · 161 阅读 · 0 评论 -
LeetCode BinarySearch 33 & 81 Search in Rotated Sorted Array I II
33. Search in Rotated Sorted ArraySuppose an array sorted in ascending order 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 ...原创 2019-12-23 13:10:56 · 105 阅读 · 0 评论 -
Leetcode BinarySearch 153 154 Find Minimum in Rotated Sorted Array l & ll
153. Find Minimum in Rotated Sorted ArraySuppose an array sorted in ascending order 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]).Find th...原创 2019-12-22 09:14:01 · 64 阅读 · 0 评论 -
LeetCode BinarySearch 702 Search in a Sorted Array of Unknown Size
702. Search in a Sorted Array of Unknown SizeGiven an integer array sorted in ascending order, write a function to search target in nums. If target exists, then return its index, otherwise return -1...原创 2019-12-22 05:14:22 · 161 阅读 · 0 评论 -
LeetCode BinarySearch 278 first bad version
Leetcode 278 first bad versionYou are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each ve...原创 2019-12-22 04:28:29 · 71 阅读 · 0 评论 -
LeetCode BinarySearch 34 Find First and Last Position of Element in Sorted Array
34. Find First and Last Position of Element in Sorted ArrayGiven an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorithm’s r...原创 2019-12-22 03:48:29 · 56 阅读 · 0 评论