Skip to content
RED SAGSkills
hard20 pts · first answer countsstacks-and-queues

Cheapest way to join ropes

Ropes have lengths [4, 3, 2, 6]. Joining two ropes costs the sum of their lengths. Using a min-heap to always join the two shortest, what is the minimum total cost?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions