上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 40 下一页
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
posted @ 2015-07-26 18:50 amazingzoe 阅读(132) 评论(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 space i... 阅读全文
posted @ 2015-07-26 12:11 amazingzoe 阅读(150) 评论(0) 推荐(0)
摘要: A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文
posted @ 2015-07-26 11:44 amazingzoe 阅读(169) 评论(0) 推荐(0)
摘要: Subsets I:Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution se... 阅读全文
posted @ 2015-07-25 09:02 amazingzoe 阅读(155) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted in asc... 阅读全文
posted @ 2015-07-24 11:20 amazingzoe 阅读(139) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l... 阅读全文
posted @ 2015-07-24 10:47 amazingzoe 阅读(120) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2015-07-24 10:38 amazingzoe 阅读(125) 评论(0) 推荐(0)
摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2015-07-24 10:19 amazingzoe 阅读(101) 评论(0) 推荐(0)
摘要: Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh... 阅读全文
posted @ 2015-07-23 11:44 amazingzoe 阅读(157) 评论(0) 推荐(0)
摘要: Sort a linked list in O(n log n) time using constant space complexity.Analyse: When it comes to O(nlogn), we need to think of sort algorithms like mer... 阅读全文
posted @ 2015-07-23 10:09 amazingzoe 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 40 下一页