Loading tutorials
[i][j] describes the edge from vertex i to vertex j). You should also be comfortable with big-O notation, where V is the number of vertices and 7 min readgraph[u] maps each neighbor of u to an edge weight. You should also know what a queue is, how a set gives constant-time membership tests, and the meaning of O(V + E). The helper below is the same one used earlier in t5 min readheapq gives me the smallest item". It introduces one new problem, which is connecting every vertex as cheaply as possible, 6 min read