filmov
tv
CS3C, week 11, Kruskal's algorithm for MST, the implementation

Показать описание
Slide 39, 40: it's unnecessary to explicitly define __hash__() for Vertex/Edge, since Python's default based on the id of the instance of Vertex/Edge is sufficient.
Slide 39, 40, 41: the latest implementation imports Graph, Vertex, and Edge class from last week's graph implementation, and creates MstGraph(Graph) for running Kruskal's algorithm.
Slide 39, 40, 41: the latest implementation imports Graph, Vertex, and Edge class from last week's graph implementation, and creates MstGraph(Graph) for running Kruskal's algorithm.