python Teemo solution


  • 0
    P
    class Solution(object):
        def findPoisonedDuration(self, timeSeries, duration):
            if timeSeries == []:
                return 0
            tot = duration
            for i in range(len(timeSeries)-1):
                tot += min(duration,timeSeries[i+1] - timeSeries[i])
            return tot
    

Log in to reply
 

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