Connect N Ropes With Minimum Cost Leetcode