'''
For given number of nodes(int) and paths(array) find remaining paths to have each pair of nodes connected.
For nodes = 4 and paths = [[0, 1], [1, 2], [2, 0]],
the output should be:
solution(cities, roads) = [[0, 3], [1, 3], [2, 3]].
'''
def solution(nodes,paths):
output = []
return output
print(
solution(4,
[[0, 1], [1, 2], [2, 0]])
) #output [[0, 3], [1, 3], [2, 3]]
print(
solution(7,
[
[5,3],
[4,0],
[0,1],
[6,5],
[3,4],
[0,3],
[2,0],
[2,1],
[2,6],
[5,1],
[3,2],
[0,5],
[1,3],
[1,4],
[6,3]
])
) #output [[0,6], [1,6], [2,4], [2,5], [4,5], [4,6]]
print(
solution(1,[])
) #output []
To embed this project on your website, copy the following code and paste it into your website's HTML: