Elevators
There is a building with $10^9$ floors labelled $1$ to $10^9$ from the bottom to the top. $N$ people would like to move up several floors in the building. Specifically, the $i$-th person wants to move from floor $A_i$ to floor $B_i$, where $A_i < B_i$. There are $M$ elevators in the building. An elevator can hold **any** number of people. Initially, at the $0$-th second, all elevators are at floo
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.
Sign in to chat with the tutor and save your progress.
Sign in to start