Kruskal's Algorithm

Правка en2, от arpitP, 2020-12-27 11:02:59

Hello Codeforces!

Today I was trying to implement the Kruskal's Algorithm and somehow I have implemented the algorithm but I am not sure about the code I have tested it against only two test cases and it is running fine for those two test cases

My implementation

I have used the union-find data structure.

Can you please help check my code and say whether it's correct or not whether will it give the correct output aginst all the test case

and if it's correct can I optimize it any more?

Any suggestion, ideas, or criticism will be highly welcomed. Thank You!!

Теги kruskal, #union-find

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский arpitP 2020-12-27 11:02:59 0 (published)
en1 Английский arpitP 2020-12-27 11:02:02 2493 Initial revision (saved to drafts)