AI Coding · Stripe · Easy
You are asked to design a Warehouse component that restricts the total number of distinct boxes it can hold. A box is identified by a positive integer. Your component must enforce the following rules when a new box is submitted for storage: The box identifier must be valid (greater than zero). The same identifier may not appear more than once in the warehouse. The warehouse has a fixed capacity k — the maximum number of boxes that can be stored at any time. Implement the…
Checking your access…