Topological Sort

1 Definition In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertx v, u comes before v in the ordering. It sounds pretty academic, but I am sure you are using topological sort unconsciously every single day. 2 Application Many real world situations can be modeled as a graph with directed edges where some events must occur before others.


1 前言 秦人不暇自哀而后人哀之,后人哀之而不鉴之,亦使后人而复哀后人也 每个朝代灭亡之后,就会由下一个朝代的史官编写,如元朝灭亡之后,就由明朝来


1 前言 历史教科书说,与英国的第一次鸦片战争,敲开了清朝的大门,清朝也因此和外国签定了一系列不平等条约;而因为清朝的落伍,导致清朝不敌英国;教