Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It seems you need to run Kruskal's algorithm and afterwards check if all nodes are in the resulting minimal spanning tree.
At least that's what I think after looking at the Wikipedia article about the algorithm. -
The problem is - I am a total n00b in graphs. I've never quite got the hang of them...
-
It's not as complicated as it might seem in the beginning and in some explanations.
Graphs are collections of nodes that can be connected with edges. Weighted graphs have a number associated with every edge.
That's pretty much all there is to it.
Then you need to store the nodes and the edges in fitting data structures. -
Thank you guys for the answers - I managed to implement the algorithm in C++. 😃
Related Rants
-
iguana10Web dev's worst nightmare: "it doesn't work in 3DS browser" https://twitter.com/lizardbill/...
-
apieceoffruit3I just had a nightmare. I never became a developer. Instead I had a normal 9-5, didn't do work at home, sl...
-
Byomeer13Meanwhile at NSA: Alice: Uhm... Bob? I lost my SSH key... Bob: *facepalms* Alice: ... but i still have the ...
!rant
Uni homework...
How can I decide if a weighted, undirected graph is connected or not, using Kruskal's algorithm?
question
nightmare
graph
kruskal
university assignments
homework