Minimum Cost to Connect Sticks
Medium
Heap Scheduling Problems
You may join two sticks of lengths x and y at a cost of x + y. Print the minimum total cost to join all sticks into one.
Constraints
1 <= n <= 10^4 1 <= length <= 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.