From 5977ae9678db9ec912214c67f6f8ee15918ae230 Mon Sep 17 00:00:00 2001 From: Ir1d Date: Wed, 16 Jan 2019 15:08:02 +0800 Subject: [PATCH] =?utf8?q?feat:=20=E6=8B=93=E6=89=91=E6=8E=92=E5=BA=8F?= =?utf8?q?=E7=9A=84=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- docs/graph/topo.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/graph/topo.md b/docs/graph/topo.md index 2f67c0d8..fb808f92 100644 --- a/docs/graph/topo.md +++ b/docs/graph/topo.md @@ -115,6 +115,12 @@ bool toposort() { 考虑一个图,删掉某个入度为 0 的节点之后,如果新图可以拓扑排序,那么原图一定也可以。反过来,如果原图可以拓扑排序,那么删掉后也可以。 +### 应用 + +拓扑排序可以用来判断图中是否有环, + +还可以用来判断图是否是一条链。 + ## 参考 1. 离散数学及其应用。ISBN:9787111555391 -- 2.11.0