Company: Dp World_28aug
Difficulty: medium
Metro Land Festival Problem Description Metro Land's council wants to pick a venue for a citywide festival so that, in total, its residents travel as little as possible to reach it. Metro Land is laid out on a 2D plane, with each city sitting at its own coordinates. If a resident's city is at (x, y) and the festival is at (a, b), that resident's travel cost is |x-a| + |y-b|. The array numPeople tells you how many residents live in each city, with numPeople[i] giving the population of city i . The venue may be placed at any point with integer coordinates. Determine the placement that minimizes the combined travel cost across every resident, and return that minimum total cost. Function Description Complete the function minimizeCost in the editor with the following parameter(s): int numPeople[n] : each numPeople[i] denotes the number of people in city i int x[n] : each x[i] denotes the x coordinate of city i int y[n] : each y[i] denotes the y coordinate of city i Returns int : the minimum