Wrong output using Prims algo

CB IDE is not working so I have submitted my code you can take the code from there.

@supratik260699 your code is not finding the minvertex correctly.update your if condition like this