The TaxiPark class stores information about the registered drivers, passengers, and their trips. Your task is to implement six functions which collect different statistics about the data.
fun TaxiPark.findFakeDrivers(): Collection<Driver>
Find all the drivers who performed no trips.
fun TaxiPark.findFaithfulPassengers(minTrips: Int): List<Passenger>
Find all the clients who completed at least the given number of trips.
fun TaxiPark.findFrequentPassengers(driver: Driver): List<Passenger>
Find all the passengers, who were taken by a given driver more than once.
fun TaxiPark.findSmartPassengers(): Collection<Passenger>
Find the passengers who had a discount for majority of their trips. Note that the discount can't be 0.0, it's always non-zero if it's recorded.
fun TaxiPark.findTheMostFrequentTripDuration(): IntRange?
Find the most frequent trip duration among minute periods 0..9, 10..19, 20..29, and so on. Return any suitable period if many are the most frequent, return null if there're no trips.
fun TaxiPark.checkParetoPrinciple(): Boolean
Check whether no more than 20% of the drivers contribute 80% of the income. If the taxi park contains no trips, the result should be false.