Company: Zscaler__

Difficulty: medium

Problem Statement

Problem Description There is a network of friends numbered from 1 to friends_nodes who purchase wholesale products from different companies numbered from 1 to 100. Each pair of friends ( x , y ) is connected by a common company c if they both use c . If friends x and y are connected by company c1 , and friends y and z are also connected by the same company c1 , then x and z are also considered connected by company c1 . Your task is to find the maximum product of two friend IDs ( x * y ) within the largest group of friends connected by a common company. The function is expected to return an INTEGER. The function accepts the following parameters: - `friends_nodes`: INTEGER - `friends_from`: INTEGER_ARRAY - `friends_to`: INTEGER_ARRAY - `friends_weight`: INTEGER_ARRAY Constraints 1 <= friends_from[i], friends_to[i] <= friends_nodes 1 <= friends_weight[i] <= n friends_from[i] != friends_to[i] A pair of friends can be connected by more than one company. Examples Illustrative Exa

More Zscaler__ OA questionsInterview experiences