Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Adjacency Matrix:
[0, 1, 1, 1]
[1, 0, 1, 0]
[1, 1, 0, 0]
[1, 0, 0, 0]

Connections for each vertex:
A: B C D
B: A C
C: A B
D: A
Adjacency Matrix:
0 1 1 1
1 0 1 0
1 1 0 0
1 0 0 0

Connections for each vertex:
A: B C D
B: A C
C: A B
D: A
Adjacency Matrix:
0 1 1 1
1 0 1 0
1 1 0 0
1 0 0 0

Connections for each vertex:
A: B C D
B: A C
C: A B
D: A