Company: Uber_23july
Difficulty: medium
Package Drop Optimization Problem Description Uber Connect package delivery team is reviewing how delivery agents handle packages across multiple zones. For each of the n delivery zones: scheduledDrop[i] stores the scheduled time (in minutes) to drop the package in the i th zone. realDrop[i] stores the actual time (in minutes) the package was dropped in the i th zone. Due to system limitations, the assignment of scheduled times and actual times to zones was not fixed, and can be shuffled independently before analysis. To evaluate overall performance, Uber calculates a weighted drop delay, where each zone is given a weight equal to its zone number. The weighted drop delay is formally defined as: (Assuming 1-based indexing) Total Weighted Drop Delay = ∑ i=1 n i * (realDrop[i] - scheduledDrop[i]) Implement a function that determines the maximum possible weighted drop delay defined above. You are allowed to reorder both arrays independently in any way to maximize the total delay score.