You must complete every task, and each task takes a whole number of hours that never exceeds sessionTime. Within one work session the total hours spent cannot exceed sessionTime. Return the minimum number of sessions needed to finish all tasks.
Input: A JSON object {"tasks": [<durations>], "sessionTime": <capacity>} with every duration at most sessionTime.
Output: Return the minimum number of work sessions.
Input: {"tasks":[1,2,3],"sessionTime":3}
Output: 2
Explanation: Sessions of 3 and 1+2 finish everything in 2.Input: {"tasks":[3,1,3,1,1],"sessionTime":8}
Output: 2
Explanation: Two sessions suffice.1 <= len(tasks) <= 141 <= tasks[i] <= sessionTime <= 15