2013年10月9日

Word Break II

摘要: Given 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", "sand", "dog"].A 阅读全文

posted @ 2013-10-09 14:01 Step-BY-Step 阅读(354) 评论(0) 推荐(0) 编辑

Word Break

摘要: Given 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 segmented as"leet code&quo 阅读全文

posted @ 2013-10-09 11:32 Step-BY-Step 阅读(223) 评论(0) 推荐(0) 编辑

Rotate Image

摘要: You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place? 1 public class Sol... 阅读全文

posted @ 2013-10-09 08:31 Step-BY-Step 阅读(206) 评论(0) 推荐(0) 编辑

导航