Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2960. Count Tested Devices After Test Operations
Process the array left-to-right: whenever batteryPercentages[i] > 0 you test that device (increment count) and all later devices lose 1 battery (floored at 0). Equivalently, return the number of indices i for which batteryPercentages[i] is greater than the number of previously successful tests.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.