SIR,
The step 2 for the given question is absolutely incorrect becuse if we initialise the MAX variable to 1, in a case when there are no customers (which is never impossible), the MAX would store 1 when it should actually store 0.
Logically, taking max=1 would get us the desired results in a generalised practical scenario but then again....if we are given the question as an mcq, we are made concious to think that we need to consider all the hypothetical cases and answer questions accordingly.I hope you would do the needful.THANK YOU