Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Adjacency Matrix:
0 3 2 0
0 0 0 0
0 1 0 0
4 0 0 0

Vertex Data:
Vertex 0: A
Vertex 1: B
Vertex 2: C
Vertex 3: D
Adjacency Matrix:
0 3 2 0
0 0 0 0
0 1 0 0
4 0 0 0

Vertex Data:
Vertex 0: A
Vertex 1: B
Vertex 2: C
Vertex 3: D
Adjacency Matrix:
0 3 2 0
0 0 0 0
0 1 0 0
4 0 0 0

Vertex Data:
Vertex 0: A
Vertex 1: B
Vertex 2: C
Vertex 3: D