I hereby claim:
- I am chinwendu20 on github.
- I am oriaku_maureen (https://keybase.io/oriaku_maureen) on keybase.
- I have a public key ASAc2xgo2amqXhMbZbAyCDVEfCu6hPssr0YZSIqD3a6cUwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class Solution: | |
| def leastInterval(self, tasks: List[str], n: int) -> int: | |
| s = Counter(tasks) | |
| # {A: 3, B: 3} | |
| maxHeap = [-i for i in s.values()] #xxxxxxxx | |
| # s.values() = [3, 3] | |
| heapq.heapify(maxHeap) | |
| # heapq.heapify(s.values()) |