2015年10月29日

72. Edit Distance (String; DP)

摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文

posted @ 2015-10-29 16:50 joannae 阅读(138) 评论(0) 推荐(0) 编辑

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) 编辑

导航