上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 51 下一页
2014年2月28日
摘要: Wildcard Matching2014.2.28 01:49Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The fun 阅读全文
posted @ 2014-02-28 02:06 zhuli19901106 阅读(810) 评论(0) 推荐(0) 编辑
2014年2月27日
摘要: Word Ladder II2014.2.13 01:23Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed at a timeEach intermediate word must exist in the dictionaryFor example,Given:start="hit"end="cog"di 阅读全文
posted @ 2014-02-27 03:22 zhuli19901106 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Word Ladder2014.2.27 02:14Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be changed at a timeEach intermediate word must exist in the dictionaryFor example,Given:start="hit"end="cog&quo 阅读全文
posted @ 2014-02-27 02:45 zhuli19901106 阅读(464) 评论(0) 推荐(0) 编辑
摘要: Word Break II2014.2.27 02:03Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens="catsanddog",dict=["cat", "cats", "and", "san 阅读全文
posted @ 2014-02-27 02:12 zhuli19901106 阅读(470) 评论(0) 推荐(0) 编辑
摘要: Word Break2014.2.27 01:46Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For example, givens="leetcode",dict=["leet", "code"].Return true because"leetcode"can be segmen 阅读全文
posted @ 2014-02-27 01:51 zhuli19901106 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Valid Number2014.2.27 01:36Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem statement to be ambiguous. You should gather all requirements 阅读全文
posted @ 2014-02-27 01:43 zhuli19901106 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Surrounded Regions2014.2.27 00:59Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region.For example,X X X XX O O XX X O XX O X XAfter running your function, the boa 阅读全文
posted @ 2014-02-27 01:27 zhuli19901106 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Substring with Concatenation of All Words2014.2.27 00:46You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.For example, given:S: 阅读全文
posted @ 2014-02-27 00:57 zhuli19901106 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Scramble String2014.2.27 00:04Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation ofs1="great": great / \ gr eat / \ / \g r e at / \ a tTo scramble the string,... 阅读全文
posted @ 2014-02-27 00:15 zhuli19901106 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Word Search2014.2.26 23:59Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.Fo 阅读全文
posted @ 2014-02-27 00:03 zhuli19901106 阅读(1223) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 51 下一页