
DFS
Peng_maple
这个作者很懒,什么都没留下…
展开
-
[leetcode] 97. Interleaving String
Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.Example 1:Input: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac”Output: trueExample 2:Input: s1 =...原创 2019-08-01 20:02:54 · 216 阅读 · 0 评论 -
[leetcode] 130. Surrounded Regions
Surrounded RegionsGiven a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all 'O’s into 'X’s in that surrounded region.Example...原创 2019-08-16 15:30:42 · 116 阅读 · 0 评论 -
[leetcode] 131. Palindrome Partitioning
Palindrome PartitioningGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: “aab”Output:[[“a...原创 2019-08-16 16:48:42 · 162 阅读 · 0 评论 -
[leetcode] 139. Word Break
Word BreakGiven a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.N...原创 2019-08-17 11:25:40 · 212 阅读 · 0 评论