NeetCode #528LC-1167MediumHeap / Priority QueueNC Algo100
← Back to All Problems

#528 · #1167 · Minimum Cost to Connect Sticks(连接棒材的最低费用)

📌 Problem Statement & Constraints

You are given an array sticks of positive integers. Repeatedly connect two sticks into one, paying the cost of the combined length. Return the minimum total cost to connect all sticks into one. Constraints: 1 <= sticks.length <= 10^4, 1 <= sticks[i] <= 10^4.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!