Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1444. Number of Ways of Cutting a Pizza
Count the number of ways to make k-1 axis-aligned cuts on a rows×cols grid of 'A' (apple) and '.' so that each of the k resulting pieces contains at least one apple, modulo 10^9+7. With rows,cols ≤50 and k ≤10 this is typically solved using DP over subgrids combined with prefix sums to quickly check valid cuts.
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.