Search
⌘K

Leetcode 1386. Cinema Seat Allocation

Given n rows of 10 seats and a list of reserved seats, maximize the number of four-person groups that can be placed on adjacent seats within a single row. Because n can be as large as 10^9 but the reserved list is small, treat rows with reservations sparsely (e.g., per-row bitmasks) and determine for each such row which 4-seat blocks remain free; rows without reservations can host two groups.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.