Leetcode 621 Python

解题思路:将数量最多的task排在首位,以该task的间隔进行插空,计算插空可否插满,不能插满则返回带有间隔的时间数,不然返回任务总数便可。python class Solution(object): def leastInterval(self, tasks, n): """ :type tasks: List[str] :type n: int :rtype: int
相关文章
相关标签/搜索