Skip to content

Commit cb9a426

Browse files
committed
Minor style fix
1 parent 0685507 commit cb9a426

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/packt/datastructuresandalg/lesson6/activity/weightedundirected/solution/AdjacencyMatrixWeightedUndirected.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ public AdjacencyMatrixWeightedUndirected(int nodes) {
88
}
99

1010
public void addEdge(int u, int v, int weight) {
11-
this.adj[u][v] = weight;
12-
this.adj[v][u] = weight;
11+
this.adj[u][v] = this.adj[v][u] = weight;
1312
}
1413

1514
public int edgeWeight(int u, int v) {

0 commit comments

Comments
 (0)