File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 6
6
import java .util .Arrays ;
7
7
import java .util .PriorityQueue ;
8
8
9
+ @ SuppressWarnings ({"java:S135" , "java:S2234" })
9
10
public class Solution {
10
11
private int [] edge ;
11
12
private int [] weight ;
@@ -52,9 +53,9 @@ public boolean[] findAnswer(int n, int[][] edges) {
52
53
if (u == n - 1 ) {
53
54
break ;
54
55
}
55
- for (int index = head [u ]; index != -1 ; index = next [index ]) {
56
- int v = edge [index ];
57
- int w = weight [index ];
56
+ for (int localIndex = head [u ]; localIndex != -1 ; localIndex = next [localIndex ]) {
57
+ int v = edge [localIndex ];
58
+ int w = weight [localIndex ];
58
59
long newDistance = distance + w ;
59
60
if (newDistance < distances [v ]) {
60
61
distances [v ] = newDistance ;
You can’t perform that action at this time.
0 commit comments