← All problemsSign in

1845. Seat Reservation Manager

LeetCodeDesignHeap (Priority Queue)Open on judge ↗

Design a system that manages the reservation state of n seats that are numbered from 1 to n. Implement the SeatManager class: - SeatManager(int n) Initializes a SeatManager object that will manage n seats numbered from 1 to n. All seats are initially available. - int reserve() Fetches the smallest-numbered unreserved seat, reserves it, and returns its number. - void unreserve(int seatNumber) U

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start