1
class Solution {
2
public long taskSchedulerII(int[] tasks, int space) {
3
HashMap<Integer, Long> map = new HashMap<>();
4
long day = 0;
5

6
for (int item : tasks) {
7
if (map.containsKey(item) && map.get(item) > day) day = map.get(item);
8

9
day++;
10
map.put(item, day + space);
11
}
12

13
return day;
14
}
15
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0