Implementation of Prim's Minimum Spanning Tree Agorithm