Bus full of passengers

Bus full of passengers solution codechef There is an empty bus with MM seats and a total of NN people, numbered from 11 to NN. Everyone is currently outside the bus. You are given a sequence of QQ events of the following form. + i+ i : It denotes that the person ii enters the bus. − i− i : It denotes that the person ii leaves the bus. It is guaranteed…

Read More