Graphs, dependencies and topological sorting
Model relationships between components, traverse graphs and reason about dependency ordering.
View lesson accessAll lessonsWhat the lesson covers
The course lesson is called The boot order puzzle. Twelve peripherals start in an order Asha hard-coded. Add a new one and the board hangs, because it needs something that starts later. The fix is to describe the dependencies and let an algorithm find the order.
- graph representations
- BFS
- DFS
- topological sort
- union-find
Before you start
Question to think about: What should the program report if a dependency graph contains a cycle?
Preparation exercise: Sketch a small directed graph with independent nodes and a cycle, and specify the required behavior.
This is an original public study prompt, not the paid lesson or its solution. The interactive course contains the walkthroughs, labs, exercises and recaps.
Read the free embedded C articles for additional practice.
Test your understanding
Practice free firmware interview questions and mock interviews · Assess your readiness