
LeetCode之DFS
黄焖鸡米饭啊
嗯。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Surrounded_Regions
题目描述: Given 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. (给定一个包含"X"和"O"的二维板,捕捉所有被X包围的...原创 2017-08-29 19:43:34 · 414 阅读 · 0 评论 -
Restore IP Addresses
题目描述: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", "255.255.111.35原创 2017-07-30 21:13:42 · 224 阅读 · 0 评论 -
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 must not contain duplicate subsets.原创 2017-07-27 12:14:26 · 516 阅读 · 0 评论 -
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 there will be only one unique solution. 意思就是解一个数独。 p原创 2017-07-22 11:48:15 · 219 阅读 · 0 评论 -
N-Queens II
题目描述: Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. 思路:同N Queens一样,是一道题求的结果不同。 public class N_QueensTwo { public s原创 2017-07-20 11:49:08 · 230 阅读 · 0 评论 -
N Queens
题目描述: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens pu原创 2017-07-19 20:15:14 · 347 阅读 · 0 评论 -
Word_Search
题目描述:Given 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” cell原创 2017-06-07 19:32:54 · 276 阅读 · 0 评论