c code easy solution
\nint findPoisonedDuration(int* timeSeries, int timeSeriesSize, int duration)\n{\n    int total = 0;\n    for(int i = 0; i<timeSeriesSize-1; i++){\n        if(t
```\nint findPoisonedDuration(int* timeSeries, int timeSeriesSize, int duration)\n{\n    int total = 0;\n    for(int i = 0; i<timeSeriesSize-1; i++){\n        if(timeSeries[i] + duration > timeSeries[i+1]) total += timeSeries[i+1] - timeSeries[i];\n        else total += duration;\n    }\n    return total + duration;\n}\n```
['C']