O(n!logn) 0 ms 100% Faster Binary Search + Recursion C++ Solution
Problems for Idea Reference: https://leetcode.com/problems/partition-to-k-equal-sum-subsets/\n2. Book Alloction Problem (similiar to this https://leetcode.com/p
Problems for Idea Reference: https://leetcode.com/problems/partition-to-k-equal-sum-subsets/\n2. Book Alloction Problem (similiar to this https://leetcode.com/problems/split-array-largest-sum/)\n\nSolution\n```\nclass Solution {\npublic:\n    bool solve(vector<int> &nums,int &target,int idx,vector<int>&map)\n    {\n        if(idx==nums.size())\n            return true;\n        for(int i=0;i<map.size();i++)\n        {\n            if(map[i] + nums[idx]<=target)\n            {\n                map[i] += nums[idx];\n                if(solve(nums,target,idx+1,map))\n                    return true;\n                map[i] -= nums[idx];\n                if(map[i]==0)\n                    break;\n            }\n        }\n        return false;\n    }\n    int minSessions(vector<int>& tasks, int sessionTime) {\n        sort(tasks.begin(),tasks.end(),greater<int>());\n        int l = 1,h = tasks.size(),m;\n        while(l<h)\n        {\n            m = (l+h)/2;\n            vector<int> map(m,0);\n            if(solve(tasks,sessionTime,0,map))\n            {\n                h = m;\n            }\n            else\n                l = m + 1;\n        }\n        return h;\n    }\n};\n```
['Backtracking', 'Recursion', 'Binary Tree']