C++ super-simple and short solution - O(n), O(1) - faster than 98%
\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        if (timeSeries.size() == 0)\n            return 0;\n
```\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        if (timeSeries.size() == 0)\n            return 0;\n        int res = 0;\n        for(int i=0; i<timeSeries.size()-1; i++) {\n            if (timeSeries[i+1] - timeSeries[i] < duration)\n                res += timeSeries[i+1] - timeSeries[i];\n            else\n                res += duration;\n        }\n        return res+duration;\n    }\n};\n```\n**Like it? please upvote...**
['C']