This is the code for MSP using Kruskal’s Algo: https://ide.codingblocks.com/s/260297
Why is there a segmentation fault in the code?
hello @anushreemahur5

u r using indexing on vector edges,
for that u edges vector should be of size m
so u should declare ur edge vector as
vector < vector< int > > edges(m);