Struktur Data 2 Graph
Berikut merupakan code program struktur data 2 tentang Graph. Vertex[] vertexList; final int maxVertex = 10; int countVertex; int[][] adjacencyMatrix; public Graph() { vertexList = new Vertex[maxVertex]; adjacencyMatrix = new int[maxVertex][maxVertex]; countVertex = 0; for (int i = 0; i < vertexList.length; i++) { for (int j = 0; j < vertexList.length; j++) { adjacencyMatrix[i][j] = 0; } } } public void addVertex(char label) { vertexList[countVertex] = new Vertex(label); countVertex++; } public void a...