Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3161. Block Placement Queries
Support inserting obstacles at points on the nonnegative number line and, for each query, determine whether there exists any obstacle-free interval of length >= sz fully inside [0, x] (touching obstacles is allowed). Algorithmically this reduces to maintaining an ordered set of obstacle positions and checking if the maximum consecutive gap within [0, x] is at least sz.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.