beats 90/80 easy solution
Approachsimulated it as basic as possibleComplexity

Time complexity:
O(n)


Space complexity:
O(1)

Code

# Approach
simulated it as basic as possible

# Complexity
- Time complexity:
$$O(n)$$

- Space complexity:
$$O(1)$$

# Code
```python3 []
class Solution:
    def findPoisonedDuration(self, timeSeries: List[int], duration: int) -> int:
        if not timeSeries:
            return 0
        t=0
        for i in range(len(timeSeries)):
            if i==0:
                t+=duration
            else:
                diff=timeSeries[i]-timeSeries[i-1]
                if diff>=duration:
                    t+=duration
                else:
                    t+=diff
        return t
```
['Python3']