Skip to content

Commit ffa832d

Browse files
committed
Fixed sonar
1 parent 57051c7 commit ffa832d

File tree

1 file changed

+4
-4
lines changed
  • src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths

1 file changed

+4
-4
lines changed

src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/Solution.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ public boolean[] findAnswer(int n, int[][] edges) {
7272
}
7373

7474
private void dfs(long[] distances, int u, int pre, boolean[] ans) {
75-
for (int index = head[u]; index != -1; index = next[index]) {
76-
int v = edge[index];
77-
int w = weight[index];
78-
int i = index >> 1;
75+
for (int localIndex = head[u]; localIndex != -1; localIndex = next[localIndex]) {
76+
int v = edge[localIndex];
77+
int w = weight[localIndex];
78+
int i = localIndex >> 1;
7979
if (distances[v] + w != distances[u]) {
8080
continue;
8181
}

0 commit comments

Comments
 (0)