leetcode-dfs
文章平均质量分 80
shanshanhi
这个作者很懒,什么都没留下…
展开
-
Longest Increasing Path in a Matrix
Given an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of ...原创 2018-04-17 18:13:53 · 226 阅读 · 0 评论 -
Out of Boundary Paths 出界的路径
There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in four directions (up, down, left, right). However...转载 2018-04-17 18:31:02 · 352 阅读 · 0 评论 -
knight-probability-in-chessboard(“马”在棋盘上的概率)
On an NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. The rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right s...原创 2018-04-17 19:15:49 · 1775 阅读 · 0 评论 -
increasing subsequences (递增子序列)
Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing subsequence should be at least 2 .Example:Input: [4,...转载 2018-04-17 20:48:43 · 445 阅读 · 0 评论 -
78. Subsets ,90. Subsets II(待研究)---位运算法(重要和Combination Sum一系列的题目类似)
第一题、78. Subsets Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,3], a solution is: [ ...原创 2017-02-23 15:35:21 · 394 阅读 · 0 评论