Available question text
Simulate friends arriving in chronological order and always assign each arrival the smallest-numbered free chair. Use a min-heap of available chair indices and a min-heap keyed by leave times to free chairs as time advances, and return the chair assigned to targetFriend.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1942. The Number of the Smallest Unoccupied Chair
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source