Prim's Minimum Cost Spanning Tree Algorithm