Aurora Innovation models communication among members of an autonomous vehicle engineering team as timestamped acquaintance events. Given n people and a list of direct connections, determine the earliest time at which every person is connected to every other person through a direct or indirect path.
A connection is undirected. Events may be provided in any order, and multiple events may have the same timestamp. All events with the same timestamp are considered available simultaneously.
Implement earliest_full_connectivity(n, connections).
n is an integer representing people labeled 0 through n - 1.connections is a list of [timestamp, person_a, person_b] records.-1 if the graph never becomes fully connected.def earliest_full_connectivity(n, connections):