IMC Interview Question
People are waiting for a elevator in a hotel. A elevator has limited capacity and Hotel has floor 0 to M. Elevator has a limit of X ppl and weight of Y. There are N ppl standing at ground floor in a queue. So there are two arrays A[N] B[N]. A is weight of each person and B is the floor the person wants to go. The elector goes up and stops at each selected level and comes Back to the ground floor. Write a solution of how many times the elevator will stop.
Unlock the Full Solution
Enter your email to get instant access to the complete solution, explanation, and similar practice problems.