What are some common pitfalls or misconceptions about topological sort?
Topological sort is a technique to order the nodes of a directed acyclic graph (DAG) such that for every edge from u to v, u comes before v in the ordering. It is useful for solving problems that involve dependencies, such as scheduling tasks, resolving dependencies, or finding a linear order of courses. However, there are some common pitfalls or misconceptions about topological sort that you should avoid when applying or preparing for it. Here are some of them.