Изменения
→Реализация
== Реализация ==
'''<tex>\text{Prim}(G, w)</tex>''' <tex>'''for</tex> ''' (<tex>v \in V[G]</tex>)
<tex> key[v] \leftarrow \infty </tex>
<tex>p[v] \leftarrow \text{NIL}</tex>
<tex>key[r] \leftarrow 0 </tex>
<tex>Q \leftarrow V[G] </tex>
<tex>v \leftarrow \text{extract-min}(Q) </tex>
<tex> p[u] \leftarrow v </tex>
<tex>key[u] \leftarrow w(v, u)</tex>