...

/

DIY: Divide Chocolate

DIY: Divide Chocolate

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 ...

Access this course and 1200+ top-rated courses and projects.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy