basketball4567 0 Newbie Poster

Hey guys,

Im creating a weighted minimal spanning tree and using breadth first search among other things. My question is that in the breadth first search, there needs to be a way to look at nodes that are already connected to see if it creates a cycle. This wouldn't be hard if the graph was unweighted but since node 0 could connect to anything, im having trouble grasping how to write the visited or adjacent function . Also, i have my edge info stored in an adjacency matrix. Any help would be greatly appreciated.

Thanks
-Basketball4567