• Can Someone please explain how cancellation rates are calculated ?

For '2013-10-02' , the rate is 0.00 since the status is completed for all, but how come 0.33 for '2013-10-01' and 0.50 for '2013-10-03' ?

• Calculations are only for unbanned users

• is it for unbanned users or unbanned clients ? For '2013-10-01' , one of the cancellations is made by driver but it has a client with id 2 ? So what we need to consider here ? Please put some light on this.

• This post is deleted!

• now it is clear as described below

(1) for 2013-10-01

do not need to consider the second tuple since it comes from a banned user

so altogether 3 tuples, 1 cancelled, ratio is 1/3

(2) for 2013-10-03

do not consider the 8th tuple ( the tuple with Id = 8),

so 2 tuples, 1 cancelled, ratio is 1/2

I think the question is not wrong, you see, the desired requests are from unbanned clients, not the cancellation. So you need to

(1) find out the requests made by unbanned clients ( because the trip is requested by client)

(2) calculate the cancellation ratio (either by client or driver)

• Thanks a lot :) Your answer cleared everything and helped me to solve the problem :)

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.