MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Pop

Method Pop

graph/prim.go:22–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func (h *minEdge) Pop() interface{} {
23 old := *h
24 n := len(old)
25 x := old[n-1]
26 *h = old[0 : n-1]
27 return x
28}
29
30func (g *Graph) PrimMST(start Vertex) ([]Edge, int) {
31 var mst []Edge

Callers 1

PrimMSTMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected