You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int canPartitionKSubsets(vector<int>& nums, int curr, const int target, int k, int mask, unordered_map<int, unordered_map<int, unordered_map<int, int>>>& dp) {
if(curr == target) {
curr = 0;
k--;
}
int n = (int)nums.size();
if(k == 0 and mask == (1 << n) - 1 and curr == 0) {