摘要:
题目: Suppose 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). Y 阅读全文
摘要:
题目: 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 sort 阅读全文
摘要:
题目: Implement int sqrt(int x). Compute and return the square root of x. 题意:本题是要找一个大于0的整数的开方之后的整数结果,如果有整数结果则返回该结果,若没有整数结果则返回最接近的整数值。因为x>=0,所以求的解肯定在0和x之 阅读全文