Company: uber_6oct
Difficulty: medium
Largest Partner Cluster Product Problem Description Uber Eats delivery partners are often linked to restaurants they frequently pick up from. Each restaurant hub is represented by an ID from 1 to 100. If two delivery partners both pick up from the same restaurant, they are considered connected through that hub. Connections are transitive within a restaurant hub: If Partner A picks up from the same restaurant as Partner B, and Partner B picks up from the same restaurant as Partner C, then Partner A is also connected to Partner C through that restaurant. The goal is to determine the maximum product of two partner IDs in the largest cluster connected through a single restaurant hub. Illustrative Example: Consider the following connections for restaurant hub 51: From | To | Company -----|----|-------- 1 | 2 | 51 7 | 3 | 51 5 | 6 | 51 10 | 8 | 51 6 | 9 | 51 2 | 3 | 51 In this example, all links use the same restaurant hub (51), but not all delivery partners are in the same cluster. When the