NeetCode #540LC-1845MediumHeap / Priority Queue
← Back to All Problems#540 · #1845 · Seat Reservation Manager(座位预约管理系统)
📌 Problem Statement & Constraints
Design a seat reservation manager for seats numbered
1..n. reserve() returns the smallest unreserved seat and marks it reserved; unreserve(seatNumber) frees it. Constraints: 1 <= n <= 10^5; at most 2 * 10^5 calls.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!