Skip to content

Instantly share code, notes, and snippets.

@sausheong
Created May 3, 2022 03:18
Show Gist options
  • Save sausheong/40fdb91ce548a59909210103fd28063a to your computer and use it in GitHub Desktop.
Save sausheong/40fdb91ce548a59909210103fd28063a to your computer and use it in GitHub Desktop.
mst
func (g *Graph) HasEdge(name string, edge *Edge) bool {
for _, e := range g.Edges[name] {
if e.node.name == edge.node.name && e.weight == edge.weight {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment