</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

09

:

01

Get this deal
Back to Dashboard

Warehouse Item Counter

Medium

You are building a warehouse inventory scanner that analyzes a 2D grid representing a warehouse floor. Each cell is either 'X' (part of an item) or '.' (empty floor). Two 'X' cells belong to the same item if they are directly adjacent (up, down, left, or right) and the scanner's areSameItem API confirms they are part of the same object.

In the full problem, you are given access to a black-box API: ...