Company: Salesforce SDE_23april
Difficulty: medium
In a Salesforce-powered organization, different departments are represented as connected undirected nodes in a network with a total of org_nodes nodes numbered from 1 to org_nodes . Each node corresponds to a department, and the communication channels between these departments are represented as edges that connects org_from[i] to org_to[i] with associated costs org_weight[i] . The organization needs to optimize its system by removing unnecessary communication channels between departments while maintaining full connectivity, i.e. each entity must be connected to each other either directly or through a sequence of channels. The objective is to determine the maximum possible sum of communication channel costs that can be removed, ensuring the organization system's entities remain connected for efficient operations. Note: All the communication channels (edges) are of bi-directional nature and the associated costs with these edges can be negative as well. Example: org_nodes = 3, org_edges =