Minimum Spanning Tree Leetcode Practice