Easy C++ Solution
\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& t, int duration) {\n        int ans = 0;\n        for(int i = 0;i < t.size() - 1;i++)\n  
```\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& t, int duration) {\n        int ans = 0;\n        for(int i = 0;i < t.size() - 1;i++)\n        {\n            ans = ans + min(duration,t[i + 1] - t[i]);\n        }\n        return ans + duration;\n    }\n};\n```
[]