
BFS
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] 127. Word Ladder
Word LadderGiven two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter can be chan...原创 2019-08-14 22:19:40 · 116 阅读 · 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] 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 评论