Simple Java Solution | 100% faster
\n\nclass Solution {\n    public int findPoisonedDuration(int[] ts, int duration) {\n        if(ts.length < 1)\n            return 0;\n        int res = 0;\n   
```\n\nclass Solution {\n    public int findPoisonedDuration(int[] ts, int duration) {\n        if(ts.length < 1)\n            return 0;\n        int res = 0;\n        for(int i=0;i<ts.length-1;i++){\n            res += Math.min(duration,ts[i+1]-ts[i]);\n        }\n        return res+duration;\n    }\n}\n\n```
[]