上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 43 下一页

2015年10月29日

97. Interleaving String (String; DP)

摘要: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbcac", ret 阅读全文

posted @ 2015-10-29 08:25 joannae 阅读(161) 评论(0) 推荐(0) 编辑

140. Word Break II (String; DP,DFS)

摘要: Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such p 阅读全文

posted @ 2015-10-29 06:47 joannae 阅读(525) 评论(0) 推荐(0) 编辑

2015年10月28日

139. Word Break (String; DP)

摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For 阅读全文

posted @ 2015-10-28 18:51 joannae 阅读(246) 评论(0) 推荐(0) 编辑

2015年10月27日

120. Triangle(Array; DP)

摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文

posted @ 2015-10-27 20:10 joannae 阅读(226) 评论(0) 推荐(0) 编辑

2015年10月23日

132. Palindrome Partitioning II (String; DP)

摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning 阅读全文

posted @ 2015-10-23 21:01 joannae 阅读(152) 评论(0) 推荐(0) 编辑

2015年10月14日

91. Decode Ways (Array; DP)

摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文

posted @ 2015-10-14 21:30 joannae 阅读(197) 评论(0) 推荐(0) 编辑

45. Jump Game II (Array; Two-Pointers,Greedy)

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文

posted @ 2015-10-14 21:25 joannae 阅读(188) 评论(0) 推荐(0) 编辑

70. Climbing Stairs (Array; DP)

摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文

posted @ 2015-10-14 18:59 joannae 阅读(138) 评论(0) 推荐(0) 编辑

123. Best Time to Buy and Sell Stock III (Array; DP)

摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文

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

122. Best Time to Buy and Sell Stock II (Array;Greedy)

摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文

posted @ 2015-10-14 18:45 joannae 阅读(164) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 43 下一页

导航