(tasks, n)
| 6 | * @return {number} |
| 7 | */ |
| 8 | var leastInterval = function (tasks, n) { |
| 9 | const frequencyMap = getFrequencyMap(tasks); |
| 10 | const maxHeap = getMaxHeap(frequencyMap); |
| 11 | |
| 12 | return getMinimumCpuIntervals(maxHeap, n); |
| 13 | }; |
| 14 | |
| 15 | var getFrequencyMap = (tasks, frequencyMap = new Array(26).fill(0)) => { |
| 16 | for (const task of tasks) { |
nothing calls this directly
no test coverage detected