Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3140. Consecutive Available Seats II
Given a dynamic row of seats with operations that occupy or free individual seats, implement a query that finds and optionally reserves k consecutive available seats (or reports failure). The core challenge is to maintain and query maximal free segments efficiently under many updates, typically solved with interval/segment-tree or ordered-set techniques.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early September, 2024
Mid-level
Find periods where P people are available for at least X consecutive days
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.