Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
vertexData: ['A', 'B', 'C', 'D']

Adjacency Matrix:
[0, 1, 1, 1]
[1, 0, 1, 0]
[1, 1, 0, 0]
[1, 0, 0, 0]
vertexData: A B C D

Adjacency Matrix:
0 1 1 1
1 0 1 0
1 1 0 0
1 0 0 0
vertexData: A B C D

Adjacency Matrix:
0 1 1 1
1 0 1 0
1 1 0 0
1 0 0 0