Company: Salesforce_26july
Difficulty: medium
Minimum Journey Length Problem Description A travelling salesperson lives in a country with road_nodes houses, numbered 1 to road_nodes , and m one-way roads. The i -th road runs from house roads_from[i] to house roads_to[i] and has length roads_weight[i] . Every road is one-way: a road from a to b cannot be driven from b to a . Travelling from b to a is only possible if a separate road from b to a also exists. A journey from house x is a route that starts at house x , uses at least one road , follows each road in its own direction, and finally arrives back at house x . The length of a journey is the sum of the lengths of the roads it uses. A road may be used more than once in a journey, and houses other than x may be visited more than once. For each house x from 1 to road_nodes , report the smallest possible length of a journey from house x . If no journey from house x exists, report 0 for that house. Notes No two roads share the same start house and the same end house; that is, there