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' ?
check this https://leetcode.com/discuss/65659/question-towards-problem-description
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)