The Earliest Moment When Everyone Become Friends
Find the earliest timestamp when everyone is connected through friendships added in time order. Groups merge as each friendship arrives until one group remains.
Find the earliest timestamp when everyone is connected through friendships added in time order. Groups merge as each friendship arrives until one group remains.