摘要: Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.:http://sudoku.com.au/TheRules.aspxThe Sudoku board could be partially filled,... 阅读全文
posted @ 2016-01-02 12:38 Hygeia 阅读(153) 评论(0) 推荐(0)
摘要: Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["... 阅读全文
posted @ 2016-01-02 12:30 Hygeia 阅读(215) 评论(0) 推荐(0)
摘要: Given a collection ofdistinctnumbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3... 阅读全文
posted @ 2016-01-02 11:35 Hygeia 阅读(213) 评论(0) 推荐(0)
摘要: Suppose you are at a party withnpeople (labeled from0ton - 1) and among them, there may exist one celebrity. The definition of a celebrity is that all... 阅读全文
posted @ 2016-01-02 07:33 Hygeia 阅读(123) 评论(0) 推荐(0)
摘要: There are a row ofnhouses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certain ... 阅读全文
posted @ 2016-01-02 06:57 Hygeia 阅读(129) 评论(0) 推荐(0)