An Interview Problem

Revision en1, by Misa-Misa, 2023-12-17 15:30:23

Past week, i was asked this problem in an interview, i don't know the solution till now, help me with this.


There are $$$N$$$ people in a group, weight of $$$i$$$ 'th person is $$$W[i]$$$, there is a lift of capacity $$$C$$$ which is the maximum weight the lift can carry, everyone wants to go to the top floor via lift.
Determine $$$M$$$, where $$$M$$$ is the minimum times lift must be used by the group so that everyone is able to go to the top floor.


Not sure about constraints, please give the best solution you can.


  Rev. Lang. By When Δ Comment
en4 English Misa-Misa 2023-12-17 15:33:41 0 (published)
en3 English Misa-Misa 2023-12-17 15:33:10 15
en2 English Misa-Misa 2023-12-17 15:32:45 87
en1 English Misa-Misa 2023-12-17 15:30:23 594 Initial revision (saved to drafts)