Company: Salesforce_4th june_on campus _iit guwahti

Difficulty: medium

Problem Statement

In a Salesforce global infrastructure, there are customer support clusters numbered from 1 to clusters, distributed across multiple regions. These clusters are interconnected by n communication links, represented by the array connections, such that if two clusters are connected directly or indirectly, they belong to the same support network. Each cluster has a case resolution system to handle customer cases. If a cluster's resolution system goes offline, it forwards the cases to the active cluster in the same support network with the lowest ID, which then resolves the cases. If no active clusters remain in the network, the case is logged as unresolved. You need to process q queries of two types: A case-assignment query: "1 cluster_id", where a case is assigned to the specified cluster. A system-failure query: "2 cluster_id", where the resolution system of the specified cluster goes offline. For each case-assignment query, output the ID of the cluster that resolves t

More Salesforce_4th june_on campus _iit guwahti OA questionsInterview experiences