Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

DAGs & Topological Sort

Order tasks with dependencies, find cycles in directed graphs, and compute over DAGs in topological order.

Intermediate1 roadmap

3 objectives 5 steps about 100 min

Check what you know

The lessons are coming later. The knowledge check is ready now.

Take the knowledge check

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Produce a topological order with Kahn's algorithm and with DFS finishing order, and report failure when the graph has a cycle.
  • Detect and extract a cycle in a directed graph using three-color DFS.
  • Compute longest paths, shortest paths or path counts on a DAG by processing vertices in topological order.

Lesson plan

5 steps, about 100 min · 0 of 4 lessons available so far

  1. Dependencies as Directed Graphs Concept · 15 min · coming later
  2. Two Ways to Order a DAG Worked example · 25 min · coming later
  3. Finding the Cycle That Blocks the Build Worked example · 20 min · coming later
  4. Lab: Critical Path of a Project Plan Lab · 25 min · coming later
  5. Check: Ordering and Cycle Problems Knowledge check · 6 questions

Practise it

Write a build-order tool that reads 'target: dependencies' lines, prints a valid order or the exact cycle, computes the critical-path duration from task times, and agrees with graphlib.TopologicalSorter on every valid input.

Build it from scratch

Practice builds that exercise this skill by re-creating a real technology.

Browse 5 tutorials that practise it

References

Hard prerequisites

Unlocks

On these roadmaps

Progress and evidence for this skill are shared across all of them.