Teemo Attacking | Swift
Swift Solution:\n\n    func findPoisonedDuration(_ timeSeries: [Int], _ duration: Int) -> Int {\n\t\tguard !timeSeries.isEmpty else { return 0 }\n\t\tvar result
Swift Solution:\n\n    func findPoisonedDuration(_ timeSeries: [Int], _ duration: Int) -> Int {\n\t\tguard !timeSeries.isEmpty else { return 0 }\n\t\tvar result = duration\n\t\tfor i in 1..<timeSeries.count {\n\t\t\tresult += min((timeSeries[i] - timeSeries[i-1]), duration)\n\t\t}\n\t\treturn result\n\t}
['Swift']