Company: Rubrik_30oct
Difficulty: medium
Bangalore Road Issues Problem Description Three friends, Bipul, Nitro, and Arvind, are waiting at distinct locations in the busy city of Bangalore. The city can be represented as a graph with multiple nodes and directed roads (edges), each having various construction costs (weights). These nodes represent different locations in Bangalore, numbered from 0 to n – 1. Bipul wants Nitro and Arvind to work together to select a set of roads within this city such that it becomes possible for both Arvind and Nitro to reach him. To tackle the traffic and financial issues of Bangalore efficiently, this selected group of roads must have the maximum total construction cost possible . This issue is commonly known as "Least Cost Reachability." You are given: An integer n representing the number of distinct locations in Bangalore. An integer m representing the number of distinct edges. A 2D integer array edges , with each element [from, to, weight] , where a one-way road from from to to with a constru