DSA Factory
Curriculum
Level 4 · Advanced

Graphs

About 40 steps, from the first idea to a mastery test.

  1. Stage 0Edges and neighboursFree
    1. 1Who is next to whom10 min
    2. 2Count the connections7 min
    3. 3Mutual friends9 min
    4. 4Everyone follows them10 min
  2. Stage 1Depth-firstFree
    1. 1Go as far as you can, then back up14 min
    2. 2Remember the way you came15 min
    3. 3Remember what each place leads to15 min
    4. 4Explore with a pile instead of recursion14 min
  3. Stage 2Breadth-firstFree
    1. 1Spread out like a ripple15 min
    2. 2One search, every distance14 min
    3. 3Stop after k rings13 min
    4. 4A graph you never draw15 min
  4. Stage 3Grids as graphsFree
    1. 1Flood the island14 min
    2. 2Let the flood report back12 min
    3. 3Shortest way through a maze14 min
    4. 4Many starting points at once14 min
  5. Stage 4Topological orderFree
    1. 1What is each task waiting for?15 min
    2. 2Writing down the order14 min
    3. 3Rounds of ready tasks14 min
    4. 4How long does the whole project take?15 min
  6. Stage 5Shortest pathsFree
    1. 1Not just how far, but which way14 min
    2. 2A board game as a graph13 min
    3. 3When the places are groups15 min
    4. 4When some steps are free15 min
  7. Stage 6Weighted pathsFree
    1. 1Roads that cost different amounts16 min
    2. 2How long until everyone hears13 min
    3. 3Cheapest, but with a limit16 min
    4. 4Judge a route by its worst moment15 min
  8. Stage 7Spanning treesFree
    1. 1Connect everything for the least money16 min
    2. 2Growing one network from a point16 min
    3. 3The road you can't avoid14 min
    4. 4Split into groups that stay apart15 min
  9. Stage 8Cycles and colouringFree
    1. 1Is there a loop?14 min
    2. 2Waiting in a circle15 min
    3. 3Splitting into two teams15 min
    4. 4Peel away the dead ends14 min
  10. Stage 9MasteryFree
    1. 1Joining two islands14 min
    2. 2Rain on a hill14 min
    3. 3A chain reaction14 min
    4. 4All roads lead to the capital12 min
Start freeTry a step first