python teemo


  • 0
    S
    class Solution(object):
        def findPoisonedDuration(self, timeSeries, duration):
            """
            :type timeSeries: List[int]
            :type duration: int
            :rtype: int
            """
            
            end = 0 
            res = 0
            for t in timeSeries:
                res += t + duration - end - ((t-end) if t > end else 0)
                end = t + duration
            return res
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.