Minimum Number of Work Sessions to Finish the Tasks
You are given an array tasks where tasks[i] is the time it takes to finish the ith task. Also, you are given an integer sessionTime representing the total time you have to finish the tasks. You can work on multiple tasks simultaneously as long as the total time spent on the tasks in each session is less than or equal to sessionTime.Return the minimum number of sessions needed to finish all the tasks.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)