DIY: Divide Chocolate
We'll cover the following
Problem statement
You have one chocolate bar that consists of some chunks. Each chunk has its own sweetness given by the array sweetness
.
You have K
friends that you want to share the chocolate with. You cut the chocolate using K
cuts and get K + 1
pieces, where ...
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Devpath's Terms of Service and Privacy Policy