Available question text
Count the number of ways to assign each element to one of two ordered groups so both group sums are at least k (mod 1e9+7). Key trick: instead of enumerating partitions, subtract assignments where a group's sum < k by counting subsets with sum < k using a knapsack/subset-sum DP (k ≤ 1000).
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 2518. Number of Great Partitions
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source