Company: Adobe_11july
Difficulty: medium
Kingdom of Graphoria Network Optimization Problem Description In the mystical realm of Graphoria, the kingdom is a network of ancient towns and bridges. Each town, uniquely numbered from 1 to N, is endowed with its own reservoir of resources, represented by its weight. Meanwhile, the bridges—numbered from 1 to M—span the distances between these towns, each with a strength requirement indicated by its weight. The wise elders of Graphoria decree that for every bridge that remains standing, the combined resources of all the towns in the connected region (the connected component) must be at least as great as the strength requirement of that bridge. In other words, the towns must collectively be powerful enough to support the bridge. Your quest is to help the kingdom by removing the fewest number of bridges that is necessary so that every remaining bridge is adequately supported by the resources of its connected towns. Can you determine the minimum number of bridges that must be dismantled