Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1444. Number of Ways of Cutting a Pizza
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source