Leetcode Minimum Spanning Tree Using Kruskal Algorithm