• Stars
    star
    2
  • Language
    Python
  • Created over 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Problem Introduction Now, when you are sure that there are no cyclic dependencies in the given CS curriculum, you would like to find an order of all courses that is consistent with all dependencies. For this, you find a topological ordering of the corresponding directed graph. Problem Description Task. Compute a topological ordering of a given directed acyclic graph (DAG) with 𝑛 vertices and π‘š edges. Input Format. A graph is given in the standard format. Constraints. 1 ≀ 𝑛 ≀ 105, 0 ≀ π‘š ≀ 105. The given graph is guaranteed to be acyclic. Output Format. Output any topological ordering of its vertices. (Many DAGs have more than just one topological ordering. You may output any of them.)