Prim's Minimum Cost Spanning Tree Algorithm (Priority Queue Version)