Company: Uber_14july
Difficulty: medium
Maximum Earnings Problem Description A taxi driver knows the pick-up and drop-off locations of people requesting services. All locations are measured in km from the starting point (0 km). For each km traveled, the driver charges 1 unit of money per passenger. Additionally, some passengers are willing to pay an extra tip. Notes: The taxi can accommodate only one passenger at a time. The driver cannot backtrack. If a passenger is picked up at location 2 and dropped off at location 9, the driver cannot accommodate a passenger at locations 3 through 8. If there are two people and their locations overlap, only one of them can be accepted. Determine the maximum amount the driver can earn. Function Description Complete the function taxiDriver in the editor with the following parameter(s): int pickup[] : the pickup location of the potential riders int drop[] : the drop-off locations of the potential riders int tip[] : the tips offered by the potential riders long taxiDriver(vector pickup, vect