上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 43 下一页

2015年10月5日

77. Combinations (Recursion)

摘要: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],... 阅读全文

posted @ 2015-10-05 06:56 joannae 阅读(186) 评论(0) 推荐(0) 编辑

90. Subsets II (Back-Track, DP)

摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-descending 阅读全文

posted @ 2015-10-05 06:51 joannae 阅读(144) 评论(0) 推荐(0) 编辑

78. Subsets (Back-Track, DP)

摘要: Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must 阅读全文

posted @ 2015-10-05 06:44 joannae 阅读(250) 评论(0) 推荐(0) 编辑

131. Palindrome Partitioning (Back-Track, DP)

摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl 阅读全文

posted @ 2015-10-05 06:39 joannae 阅读(177) 评论(0) 推荐(0) 编辑

2015年10月4日

41. First Missing Positive (HashTable)

摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s 阅读全文

posted @ 2015-10-04 20:18 joannae 阅读(161) 评论(0) 推荐(0) 编辑

49. Group Anagrams (string, HashTable)

摘要: Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [ ["ate", "eat","tea"], [" 阅读全文

posted @ 2015-10-04 19:38 joannae 阅读(150) 评论(0) 推荐(0) 编辑

76. Minimum Window Substring (String, Map)

摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA... 阅读全文

posted @ 2015-10-04 19:01 joannae 阅读(156) 评论(0) 推荐(0) 编辑

63. Unique Paths II (Graph; DP)

摘要: 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-10-04 18:35 joannae 阅读(134) 评论(0) 推荐(0) 编辑

62. Unique Paths (Graph; DP)

摘要: 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-10-04 18:33 joannae 阅读(159) 评论(0) 推荐(0) 编辑

64. Minimum Path Sum (Graph; DP)

摘要: Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo... 阅读全文

posted @ 2015-10-04 18:31 joannae 阅读(193) 评论(0) 推荐(0) 编辑

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 43 下一页

导航