Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3219. Minimum Cost for Cutting Cake II
Given costs for each horizontal and vertical cut needed to split an m×n cake into 1×1 pieces, determine the cut order that minimizes total cost, knowing each cut's cost is incurred once per existing segment in the perpendicular direction. The problem reduces to a greedy scheduling/ordering challenge: choose cuts in descending cost so high-cost cuts are applied when they multiply over fewer segments.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.