摘要: Implement int sqrt(int x). Compute and return the square root of x. Have you met this question in a real interview? Yes Example sqrt(3) = 1 sqrt(4) =... 阅读全文
posted @ 2015-09-12 23:22 卖程序的小歪 阅读(165) 评论(0) 推荐(0) 编辑
摘要: For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time complexity. If the target number... 阅读全文
posted @ 2015-09-12 23:01 卖程序的小歪 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find a subarray with sum closest to zero. Return the indexes of the first number and last number. Have you met this question ... 阅读全文
posted @ 2015-09-12 22:29 卖程序的小歪 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that:All elements < k are moved to the leftA... 阅读全文
posted @ 2015-09-12 00:51 卖程序的小歪 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find a subarray where the sum of numbers is zero. Your code should return the index of the first number and the index of the ... 阅读全文
posted @ 2015-09-12 00:17 卖程序的小歪 阅读(159) 评论(0) 推荐(0) 编辑