Skip to content
← Back to the archive

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 entries
  • each change is a whole number between -1000 and 1000
  • minimum_size is a whole number between 1 and 1000

Function signature

def count_large_restocks(changes, minimum_size):

Sign in to solve this bracket

Reading the problem is free for everyone. Opening the editor and solving it requires an account with Open Bracket+.