Earliest Time When Everyone Becomes Connected
Asked at Google · Coding Questions · Difficulty: Medium
A group of `n` people, numbered `0` to `n - 1`, starts out as strangers. Over time, pairs of people become acquainted. Two people are connected if they are acquainted directly or through a chain of acquaintances. Given the log of when each pair became acquainted, find the earliest moment at which the whole group is connected.
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- Design a Real-Time Product Recommendation System
- Implement Scaled Dot-Product Attention
- Design a Multi-Tenant, Multi-Region API Rate Limiter