Prim's algorithm
fix some bugs
works
improve some style
Merge pull request #4 from yutingyw/prim

Prim's algorithm