Company: Wells_Frago_10_jan
Difficulty: medium
Maximize Delivery Revenue Problem Description A courier vehicle has information about pickup and drop-off stations for packages. All locations are measured in km from the central depot (0 km). The courier charges 1 unit per km for each package transported. Additionally, some packages include an extra fee (premium). Determine the maximum total revenue the courier can earn. Notes The courier can carry only one package at a time. The courier cannot backtrack. If a package is picked up at location 2 and dropped off at location 9, the courier cannot pick or deliver packages whose locations fall between 3 through 8. This implies that delivery intervals are exclusive. If there are two packages with overlapping shipping intervals, only one can be scheduled. Example Given the following packages: warehouse = [0, 2, 9, 10, 11, 12] destination = [5, 9, 11, 14, 17] premium = [1, 2, 3, 2, 2, 1] The optimal selection is to process packages at indices 1, 2, and 5: Package at Index 1: Revenue = (9 - 2)