Search for question
Question

Exercise 4: Minimum Spanning Tree (25 Points) Solve the problem Min Cost to Connect All Points at LeetCode using Boruvka's algorithm (see Worked Exercise 12.2 in the textbook). Note that if you use any other MST algorithm, you will not get any points. Your solution must pass all test cases at leetcode. Submit link to the submission result (e.g., https://leetcode.com/problems/PROBLEM/submissions/SUBMISSIONID/) and a screenshot of your leetcode submission showing both your code and all test cases passing. Your code should be in Python (preferred) or C++ (less preferred). Submit your code with your submission (preferably with syntax highlighting). Your code should be appropriately commented (this means any non-trivial statement or logic should be explained in the code). If you submit code (even if it passes all test cases) without any comments or explanations you will get zero points. Note that some solutions have been posted on leetcode, and they may be incorrect or may use a different MST algorithm. In any case, if we find a solution largely copied from another source (e.g., verbatim or simply with different variable names), it will be considered a violation of the academic honesty policy.

Fig: 1