I'm just starting to look at understanding the graph data structure and the breadth first search and depth first search algorithms. For a package manager like
npm, where one package might have dependencies and those dependencies might have more dependencies, if you wanted to check whether you had those dependencies already, is that a depth-first search?
- I want to install package Top
- Top has two dependencies, Middle1, and Middle2
- Middle1 has one dependency, Bottom1, and Middle2 has one dependency, Bottom2
Now before I install Top, I want to check if I have Middle1, Bottom1, Middle2, Bottom2. Is that a depth-first search?