Updated: 2024-03-12
1 min read

On This Page

class Solution:
    def countTestedDevices(self, batteryPercentages: List[int]) -> int:
        res = 0
        for x in batteryPercentages:
            x -= res
            res += x > 0
        return res
Previous
Next