c++ dp solution using mask
\nclass Solution {\npublic:\n    long long dp[1<<15][180];\n    int find(vector<int>&nums,int mask,int sum,int se,int n)\n    {\n        if(mask==(1<<n)-1)\n   
```\nclass Solution {\npublic:\n    long long dp[1<<15][180];\n    int find(vector<int>&nums,int mask,int sum,int se,int n)\n    {\n        if(mask==(1<<n)-1)\n        {\n            return 1;\n        }\n        int ans=INT_MAX;\n        if(dp[mask][sum]!=-1)\n        {\n            return dp[mask][sum];\n        }\n        for(int i=0;i<n;i++)\n        {\n            if((mask&(1<<i))==0)\n            {\n                if(sum+nums[i]>se)\n                {\n                    ans=min(ans,1+find(nums,mask|(1<<i),nums[i],se,n));\n                }\n                else\n                {\n                    ans=min(ans,find(nums,mask|(1<<i),sum+nums[i],se,n));\n                }\n            }\n        }\n        return dp[mask][sum]=ans;\n    }\n    int minSessions(vector<int>&nums, int se)\n    {\n        memset(dp,-1,sizeof(dp));\n        return find(nums,0,0,se,nums.size());\n    }\n};\n```
['C', 'Bitmask', 'C++']