Both find shortest paths from a source in a weighted graph. Dijkstra is faster but needs non-negative weights; Bellman-Ford is slower but handles negative edges and detects negative cycles.
Dijkstra (greedy + min-heap)
Repeatedly expand the closest unvisited node and relax its neighbors.
