"""
Exercise 2: Number of Operations to Make Network Connected (LeetCode 1319)

n computers, connections[i] = [a, b] cables. You may move any cable. Return
the minimum moves to connect every computer, or -1 if there are fewer than
n - 1 cables. Answer = components - 1.
"""

def make_connected(n, connections):
    # TODO
    return -1


# --- self-check: do not modify below this line ---
a = make_connected(4, [[0, 1], [0, 2], [1, 2]])
b = make_connected(6, [[0, 1], [0, 2], [0, 3], [1, 2], [1, 3]])
c = make_connected(6, [[0, 1], [0, 2], [0, 3], [1, 2]])
print(a, b, c)
print("PASS" if (a, b, c) == (1, 2, -1) else "FAIL")
