24/30
Part 6 of 7 · The worked exampleWatch
Watch · 13 min
LeetCode's Task Scheduler, where a task waits n turns before it can run again. The idea from 4:05, a max heap of counts and a queue of tasks cooling down from 6:52, and the code from 11:45. It's this worked example's heap and queue, counting turns instead of placing letters.
Task Scheduler - Leetcode 621 - Python · NeetCode · Nov 2021YouTube