A module waits for the slowest
transcript
A streaming release is built from many modules. Some modules wait for other modules to finish. The farm has as many machines as it needs.
A module waits for all of its prerequisites. Not only the first one that it meets. The slowest one decides when it can start.
Module zero finishes at three. Modules one and two run together. Module three starts at eight.
Take the largest finish, and it is nine. Take the last one seen, and it is five.
The durations add up to twelve. But two modules run together. So the build ends at eleven.
In a cycle, modules wait on each other. Some never get to start. The answer is minus one.
In the interview, ask if machines are unlimited. Ask if a cycle can exist. And ask what a cycle should return.
Each module is processed once. Each dependency is read once. So the cost is linear.
Start at the largest finish. A cycle returns minus one. Full breakdown in the lecture.