Straightforward Bitmask DP soln || Commented Solution
The approach is explained in the code.Code
The approach is explained in the code.

# Code
```cpp []
class Solution {
public:
    int solve(vector<int>& t, int k, vector<vector<int>>& dp, int mask, int time){
        if(mask == (1 << t.size()) - 1)     //when completed all tasks
            return 0;

        if(dp[mask][time] != -1)    //if subproblem solved before
            return dp[mask][time];
        
        int pick1 = 1e9, pick2 = 1e9;       //large val to avoid selecting when choosing minimum
        for(int i = 0; i < t.size(); i++){
            if(mask & (1 << i))     //already completed this task
                continue;
            
            if(t[i] > time)     //dont have enough time in current session so need to start a new one hence the +1
                pick1 = min(pick1, 1 + solve(t, k, dp, mask | (1 << i), k - t[i]));
            else    //just complete this task in the curr remaining time
                pick2 = min(pick2, solve(t, k, dp, mask | (1 << i), time - t[i]));
        }
        //since we want minimum time 
        return dp[mask][time] = min(pick1, pick2);
    }

    int minSessions(vector<int>& tasks, int k) {
        vector<vector<int>> dp(1 << 14, vector<int>(16, -1));
        return solve(tasks, k, dp, 0, k) + 1;   //+1 because one session is active in the beginning of start of process
    }
};
//since we can do it in any order then its better to bet on dp with this one
//what we can do is, we can try each task after all other tasks unless its not chosen (use a mask for that)
//about starting the solution, we should start with having k time on our hands as, we are alloed to use that much time and have two picks based on if, te remaining time can be used to finish a task or do we need a new session
```
['C++']