Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2960. Count Tested Devices After Test Operations
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source