Easy approach|| O(n)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def findPoisonedDuration(self, timeSeries: List[int], duration: int) -> int:\n        count=0\n        for i in range(len(timeSeries)):\n            if(i<len(timeSeries)-1):\n                if(timeSeries[i]+duration-1<timeSeries[i+1]):\n                    count+=duration\n                elif(timeSeries[i]+duration-1==timeSeries[i+1]):\n                    count+=timeSeries[i+1]-timeSeries[i]\n                else:\n                    count+=timeSeries[i+1]-timeSeries[i]\n            else:\n                count+=duration\n        return(count)\n\n```
['Python3']