Graph problems are a staple of the programming interview. Luckily, most graph problems you’ll encounter in an interview can be solved by one of these two algorithms: depth-first search (DFS) or breadth-first search (BFS). The hard part isn’t in writing the algorithm; it’s in figuring out how you can apply the algorithm to your problem.

Today, we’ll look at a common graph interview question that showcases an one of the two search algorithms above.

[Read more…] about Interview Problem: Compile a file and its dependencies