7 September 2026
Steady Shelf Stock
Easy
Lists
Numbers
Count how many of a shelf's stock changes were at least a given minimum restock size.
A warehouse shelf records its daily stock changes. Each entry in the list is the change for one day - a positive number means stock was added, and a negative number means stock was sold. You are also given a minimum restock size. Count how many days had a change that was at least the minimum restock size. If there are no daily changes at all, return 0.
Constraints
changes has between 0 and 500 entrieseach change is a whole number between -1000 and 1000minimum_size is a whole number between 1 and 1000
Function signature
def count_large_restocks(changes, minimum_size):