摘要: 1、判断一个迷宫是否有出口 这个题目是我自己编的,leetcode上并没有这样的题目。为了锻炼自己的DFS,这个题目应该还是比较简单的,用深搜就可以完成,和之前做的max area of island有异曲同工之妙。 poll出迷宫问题: 、 如图所示的迷宫,0代表可以走,1代表有墙。要求从左上角到 阅读全文
posted @ 2018-07-25 22:12 Lin.B 阅读(1424) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2018-07-25 17:56 Lin.B 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order. The graph is given as follo 阅读全文
posted @ 2018-07-25 16:58 Lin.B 阅读(124) 评论(0) 推荐(0) 编辑