Company: CRED_23aug
Difficulty: medium
Minimum Time for Food Deliveries Problem Description A food delivery app is implementing a feature allowing delivery agents to handle multiple orders simultaneously. The city's road network is represented as a graph with the following components: connection_nodes junctions (numbered from 0) m bidirectional roads connecting these junctions Each road between junctions connection_from[i] and connection_to[i] has a travel time of connection_weight[i] . There are k different orders to be delivered, each at a unique location. The delivery agent starts at junction 0, must complete deliveries at all k locations in any order, and then return to junction 0. Calculate the minimum time needed to complete all deliveries and return to the starting point. If it is impossible to complete the deliveries, return -1. Example (Illustrative): Consider connection_nodes = 3 , m = 3 , connection_from = [0, 1, 0] , connection_to = [1, 2, 2] , connection_cost = [10, 20, 50] and deliveries = [1, 2] . There are t