C++ || Time Complexity O(n) || Simple logic using for-loop
\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        \n        int i, n=timeSeries.size();\n        if(n=
```\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        \n        int i, n=timeSeries.size();\n        if(n==1) return duration;\n        \n        int ans=0;\n        for(i=0;i<n-1;i++){\n            if(timeSeries[i+1]-timeSeries[i] < duration)\n                ans+=timeSeries[i+1]-timeSeries[i];\n            else \n                ans+=duration;\n        }\n        ans+=duration;\n        return ans;\n        \n    }\n};\n```\n**Do UPVOTE if u liked the soln :\')**
['C']