Given tasks and cooling interval, find the least number of intervals to complete all tasks.
Sample Input:
["A","A","A","B","B","B"], 2
Hints
Hint 1
Count frequency of each task
Hint 2
Schedule most frequent tasks first
Hint 3
Mathematical formula: max(len(tasks), (maxFreq-1)*(n+1) + countMaxFreq)