Company: Uber_all
Difficulty: medium
Uber Green Zone Expansion Problem Description In order to promote sustainability, Uber is planning to expand its Green Zones: areas where only electric vehicles (EVs) are allowed to pick up riders. The city map has road_nodes number of zones connected by roads ( road_from , road_to , and road_weight (road length)). Each zone is operated by a local Uber partner, listed in the partner array. If Uber signs a contract with a partner, all zones they manage become Green Zones. To prevent EV charging overload and rider confusion, no two active Green Zones can be within minGap of each other (measured by shortest road distance). Implement a function that calculates how many different partner group combinations can be activated without violating the distance rule. The function countGreenZonePlans takes the following inputs: int road_nodes : Total number of zones in the city int road_from[n] : an array representing one endpoint of each road int road_to[n] : an array representing the other endpoin