Google Interview Question
Anonymous User
2688

Initial Question:
https://leetcode.com/problems/the-earliest-moment-when-everyone-become-friends/description/

Follow-up:
Two types of logs

  1. Add Friend - A and B become friends
  2. Remove Friend - If A and B are friends, unfriend them

Two people can be connected and disconnected multiple times.

Given this, find the earliest timestamp when all of them become friends

Comments (11)