Add the initial EN translation for C++ code (#1346)

This commit is contained in:
Yudong Jin
2024-05-06 13:31:46 +08:00
committed by GitHub
parent 9e4017b3fb
commit 8e60d12151
111 changed files with 6993 additions and 9 deletions

View File

@ -23,7 +23,7 @@ class GraphAdjMat {
addVertex(val);
}
// Add edge
// Please note, edges elements represent vertex indices, corresponding to vertices elements indices
// Edges elements represent vertex indices
for (int[] e : edges) {
addEdge(e[0], e[1]);
}
@ -98,7 +98,7 @@ class GraphAdjMat {
public class graph_adjacency_matrix {
public static void main(String[] args) {
/* Initialize undirected graph */
// Please note, edges elements represent vertex indices, corresponding to vertices elements indices
// Edges elements represent vertex indices
int[] vertices = { 1, 3, 2, 5, 4 };
int[][] edges = { { 0, 1 }, { 0, 3 }, { 1, 2 }, { 2, 3 }, { 2, 4 }, { 3, 4 } };
GraphAdjMat graph = new GraphAdjMat(vertices, edges);