leetcode整理 Depth-first Search
StudyCoder
这个作者很懒,什么都没留下…
展开
-
332. Reconstruct Itinerary
题目:重建行程单 Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs fr转载 2016-07-30 16:00:47 · 552 阅读 · 0 评论 -
133. Clone Graph
题目:无向图复制 Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separa转载 2016-07-30 21:46:24 · 488 阅读 · 0 评论 -
200. Number of Islands
题目:岛屿数量 Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.转载 2016-07-30 22:56:48 · 256 阅读 · 0 评论 -
207. Course Schedule
题目:课程表 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is e转载 2016-07-30 23:33:54 · 1263 阅读 · 0 评论 -
210. Course Schedule II
题目:课程表2 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is转载 2016-07-31 10:55:03 · 357 阅读 · 0 评论