Minimum Cost to Join Ropes (Min Heap)
Problem: Join n ropes; cost = sum of lengths being joined
Greedy: Always join two shortest ropes first
• Use min-heap to efficiently get smallest ropes
• Insert combined rope back into heap
Time: O(n log n)
O(n log n)