Minimum Search Tree with Prims and Kruskal Implementation in Java