上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 31 下一页
摘要: 题目: Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an 阅读全文
posted @ 2017-05-03 14:01 panini 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppo 阅读全文
posted @ 2017-05-03 13:52 panini 阅读(194) 评论(0) 推荐(0) 编辑
摘要: DescriptionImplement double sqrt(double x) and x >= 0.Compute and return the square root of x.NoticeYou do not care about the accuracy of the result, 阅读全文
posted @ 2017-05-03 12:27 panini 阅读(1243) 评论(0) 推荐(0) 编辑
摘要: DescriptionFind any position of a target number in a sorted array. Return -1 if target does not exist. ExampleGiven [1, 2, 2, 4, 5, 5].For target = 2, 阅读全文
posted @ 2017-04-28 05:02 panini 阅读(561) 评论(0) 推荐(0) 编辑
摘要: DescriptionWrite an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it.This matrix has the following proper 阅读全文
posted @ 2017-04-28 02:47 panini 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2017-04-28 02:46 panini 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty s 阅读全文
posted @ 2017-04-27 10:15 panini 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2 阅读全文
posted @ 2017-04-27 09:57 panini 阅读(178) 评论(0) 推荐(0) 编辑
摘要: DescriptionFor 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 targ 阅读全文
posted @ 2017-04-26 20:21 panini 阅读(262) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a target number and an integer array sorted in ascending order. Find the total number of occurrences of target in the array.ExampleGi 阅读全文
posted @ 2017-04-26 20:20 panini 阅读(511) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 31 下一页