NeetCode #270LC-1231HardBinary SearchNC Algo100
← Back to All Problems#270 · #1231 · Divide Chocolate(分享巧克力)
📌 Problem Statement & Constraints
You have one chocolate bar with pieces of sweetness
sweetness[i]. You will share it with k friends, so you cut the bar into k + 1 pieces, each a contiguous segment. You keep the piece with the minimum total sweetness. Return the maximum sweetness you can keep. Constraints: 1 <= k < sweetness.length <= 10^4, 1 <= sweetness[i] <= 10^5.🔒
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!