Graph Algorithms & Dynamic Programming
When to Use
Graphs: BFS/DFS for traversal/reachability. Dijkstra for weighted shortest path. Kruskal/Prim for MST. Topological sort for DAG ordering. Adjacency list for sparse bio networks.
DP: Overlapping subproblems + optimal substructure. NW/SW for sequence alignment. Knapsack for resource selection under constraint.
Complexity Reference
| Algorithm | Time | Space | Notes | |---|---|---|---| | BFS / DFS | O(V+E) | O(V) | | | Dijkstra
[Description truncada. Veja o README completo no GitHub.]