2015年3月10日

Restore IP Addresses

摘要: Restore IP Addresses问题:Given a string containing only digits, restore it by returning all possible valid IP address combinations.思路: dfs + 回溯模板我的代码1:... 阅读全文

posted @ 2015-03-10 21:37 zhouzhou0615 阅读(127) 评论(0) 推荐(0) 编辑

Subsets II

摘要: Subsets II问题:Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-desc... 阅读全文

posted @ 2015-03-10 21:14 zhouzhou0615 阅读(86) 评论(0) 推荐(0) 编辑

N-Queens

摘要: N-Queens问题:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.思路: dfs + 回溯 常用模板我的代码:pub... 阅读全文

posted @ 2015-03-10 20:22 zhouzhou0615 阅读(123) 评论(0) 推荐(0) 编辑

Subsets

摘要: Subsets问题:Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set m... 阅读全文

posted @ 2015-03-10 19:48 zhouzhou0615 阅读(170) 评论(0) 推荐(0) 编辑

Combination Sum II

摘要: Combination Sum II问题:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers ... 阅读全文

posted @ 2015-03-10 16:27 zhouzhou0615 阅读(241) 评论(0) 推荐(0) 编辑

Combination Sum

摘要: Combination Sum问题:Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.T... 阅读全文

posted @ 2015-03-10 16:16 zhouzhou0615 阅读(159) 评论(0) 推荐(0) 编辑

Sudoku Solver

摘要: Sudoku Solver问题:Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that ... 阅读全文

posted @ 2015-03-10 15:17 zhouzhou0615 阅读(147) 评论(0) 推荐(0) 编辑

Valid Sudoku

摘要: Valid Sudoku问题:Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells a... 阅读全文

posted @ 2015-03-10 09:48 zhouzhou0615 阅读(100) 评论(0) 推荐(0) 编辑

导航