for a graph with only few edges which algorithm is more efficient Kruskal's or Prim's?

They're both fairly easy to implement. Why not write them both and do a test?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.