Loading tutorials
Intermediate · Mid: 14 chapters · 33 min read. States assumed prerequisites
Start readingadd_edge helper. It also assumes you know sets and stacks, and the idea of a path as a sequence of edges.heapq, and reason about big-O costs. It covers shortest paths from one source in a weighted graph. Here "shortest" means the smallest total edge weight, not the fewest edges.