摘要:
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 va 阅读全文
摘要:
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). Find the minimum element. 阅读全文
摘要:
Find the last position of a target number in a sorted array. Return -1 if target does not exist. Find the last position of a target number in a sorted 阅读全文
摘要:
Given some points and a point origin in two dimensional space, find k points out of the some points which are nearest to origin.Return these points so 阅读全文
摘要:
Given a target number, a non-negative integer k and an integer array A sorted in ascending order, find the k closest numbers to target in A, sorted in 阅读全文
摘要:
Given a target number and an integer array A sorted in ascending order, find the index i in A such that A[i] is closest to the given target. Return -1 阅读全文