Topological Sort
Everything on SkillVeris tagged Topological Sort — collected across the glossary, study notes, blog, and cheat sheets.
8 resources across 2 libraries
Study Notes(1)
Interview Questions(7)
BFS vs DFS: What is the Difference?
BFS (breadth-first search) explores a graph level by level using a queue, while DFS (depth-first search) explores as deep as possible along one path before bac…
What is Topological Sort?
Topological sort produces a linear ordering of the nodes in a directed acyclic graph such that for every directed edge from node A to node B, A appears before…
Course Schedule Problem: How Would You Solve It?
Course schedule is a cycle-detection problem on a directed graph where each course is a node and a prerequisite relationship is a directed edge, and all course…
How Do You Detect a Cycle in a Directed Graph?
You detect a cycle in a directed graph with DFS that tracks each node's state as unvisited, in the current recursion path, or fully processed — a cycle exists…
What is Topological Sort and How Does Kahn's Algorithm Work?
Topological sort orders the vertices of a directed acyclic graph so that every edge points from an earlier vertex to a later one, and Kahn's algorithm produces…
What is Dynamic Programming on Graphs?
Dynamic programming on graphs solves problems like shortest paths, longest paths, and counting paths by defining a DP state per node (or per node-and-extra-dim…
Directed vs Undirected Graphs: What is the Difference?
A directed graph has edges with a specific one-way direction from one vertex to another, while an undirected graph has edges that are symmetric, meaning a conn…