Team-Kek / Notebook

Implementations of algorithms that might be useful in ICPC.
1 stars 0 forks source link

Topological sort #8

Open maxhwardg opened 8 years ago

maxhwardg commented 8 years ago

I would suggest Kahn's algorithm. It's adaptable to hard questions. Eg lexicographically least Topo sort, and can easily check if there is none.