32/32
Part 7 of 7 · Follow-upsCheck yourself
Check yourself
6 questions
  1. 1.In Kahn's algorithm, when does a task go on the queue?

  2. 2.Kahn's algorithm stops with 3 of 7 tasks in the order. What do you know about the other 4?

  3. 3.A pipeline has V tasks and E pairs. What does Kahn's algorithm cost, and what does rescanning the list for a ready task cost at worst?

  4. 4.Your depth-first sort keeps one seen-set and raises a cycle error whenever it reaches a task already in it. What happens on a pipeline where deploy needs both test and package, and both need compile?

  5. 5.package takes 2 minutes and needs compile, which finishes at minute 7, and assets, which finishes at minute 5. Kahn's pops compile first, then assets. With as many workers as you like, when does package finish?

  6. 6.You run the lesson's dfs_order, which follows unblocks, on a chain of 5,000 tasks, each needing the one before and listed first task first, with Python's default settings. What happens?

Now the problem this lesson builds to: 30 Order the tasksPractice it