dfs
文章平均质量分 82
爱你多过爱自己
我很好。
展开
-
Leetcode [609. Find Duplicate File in System]
Problem:609. Find Duplicate File in SystemQuestionGiven a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of dupl原创 2017-10-21 18:23:30 · 229 阅读 · 0 评论 -
Leetcode [207. Course Schedule]
Problem:207. Course ScheduleQuestionThere 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 cou原创 2017-10-21 17:24:01 · 200 阅读 · 0 评论 -
Leetcode [210. Course Schedule II]
Problem:210. Course Schedule IIQuestionThere 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原创 2017-11-05 14:50:30 · 170 阅读 · 0 评论 -
算法期中 拓补序
Problems:在图论中,拓扑序(Topological Sorting)是一个有向无环图(DAG, Directed Acyclic Graph)的所有顶点的线性序列. 且该序列必须满足下面两个条件: 每个顶点出现且只出现一次. 若存在一条从顶点 A 到顶点 B 的路径,那么在序列中顶点 A 出现在顶点 B 的前面. 对于一个含有n个节点的有向无环图(节点编号0到n-1),输出它的一个拓扑序.图原创 2017-12-04 00:02:58 · 265 阅读 · 0 评论