algoritmauzmanı
Sign in
TREN
Subtopic 8.3

Graph Applications

4lessons30 min0done

This subtopic covers the four uses of BFS and DFS that come up most in exams and in real programs. All of them are coded with adjacency lists and run in O(V + E) time.

Connected components find the pieces of a graph, cycle detection finds whether a chain of dependencies turns back on itself, topological sort finds an order in which tasks can be done, and the BFS shortest path finds the fewest steps to reach a vertex.

Lesson 8.3.1 Connected components7 min