Skip to content

Instantly share code, notes, and snippets.

@sausheong
Created May 2, 2022 21:25
Show Gist options
  • Save sausheong/d556be92efb0cda2595b3c5e646aa759 to your computer and use it in GitHub Desktop.
Save sausheong/d556be92efb0cda2595b3c5e646aa759 to your computer and use it in GitHub Desktop.
mst
func main() {
graph := buildGraph()
fmt.Println("GRAPH\n-----")
nodes := sortNodes(graph.Nodes)
for _, node := range nodes {
fmt.Printf("%s -> %v\n", node.name, graph.Edges[node.name])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment