Prim's algorithm
fix some bugs
works
improve some style
Merge branch 'prim'