![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图
文章平均质量分 82
Frontier_Setter
这个作者很懒,什么都没留下…
展开
-
【算法及其原理】 Tarjan——求有向图中的强连通分量
强连通分量定义:在有向图G中,如果两个顶点vi,vj间(vi>vj)有一条从vi到vj的有向路径,同时还有一条从vj到vi的有向路径,则称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。有向图的极大强连通子图,称为强连通分量(strongly connected components)。Tarjan算法:假设图有n个节点,m条边。...原创 2018-02-25 20:43:27 · 426 阅读 · 0 评论 -
[LeetCode] (medium) 210. Course Schedule II
https://leetcode.com/problems/course-schedule-ii/ 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 ...原创 2019-02-16 23:26:03 · 111 阅读 · 0 评论 -
[LeetCode] (medium) 332. Reconstruct Itinerary
https://leetcode.com/problems/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...原创 2019-04-03 23:13:58 · 114 阅读 · 0 评论 -
[LeetCode] (Hard) 685. Redundant Connection II
https://leetcode.com/problems/redundant-connection-ii/ In this problem, a rooted tree is adirectedgraph such that, there is exactly one node (the root) for which all other nodes are descendants of...原创 2019-06-21 15:29:03 · 145 阅读 · 0 评论