Goal: Given flavorDuration[] and taskTime, find the MINIMUM pieces of gum to stay focused for the whole task. Return -1 if impossible.
Input: [10, 5, 20], taskTime = 25 Output: 2 (Use 20 + 10)
Tag your solution with #DayLeet! 👨💻 and we will grade your solution!
Goal: Given flavorDuration[] and taskTime, find the MINIMUM pieces of gum to stay focused for the whole task. Return -1 if impossible.
Input: [10, 5, 20], taskTime = 25 Output: 2 (Use 20 + 10)
Tag your solution with #DayLeet! 👨💻 and we will grade your solution!