We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50d15a3 commit 6da25a7Copy full SHA for 6da25a7
src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/Solution.java
@@ -6,6 +6,7 @@
6
import java.util.Arrays;
7
import java.util.PriorityQueue;
8
9
+@SuppressWarnings({"java:S135", "java:S2234"})
10
public class Solution {
11
private int[] edge;
12
private int[] weight;
@@ -52,9 +53,9 @@ public boolean[] findAnswer(int n, int[][] edges) {
52
53
if (u == n - 1) {
54
break;
55
}
- for (int index = head[u]; index != -1; index = next[index]) {
56
- int v = edge[index];
57
- int w = weight[index];
+ for (int localIndex = head[u]; localIndex != -1; localIndex = next[localIndex]) {
+ int v = edge[localIndex];
58
+ int w = weight[localIndex];
59
long newDistance = distance + w;
60
if (newDistance < distances[v]) {
61
distances[v] = newDistance;
0 commit comments