Skip to content

Commit 533252d

Browse files
author
Samuel Facchinello
committed
fix spotbug
1 parent 619190f commit 533252d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public final class AllPathsFromSourceToTarget {
1717
private AllPathsFromSourceToTarget(int vertices) {
1818
this.vertexCount = vertices;
1919
this.allPaths = new ArrayList<>();
20-
this.adjList = new ArrayList[vertices];
20+
this.adjList = new List[vertices];
2121
initializeAdjacencyList();
2222
}
2323

@@ -46,7 +46,7 @@ private void addEdge(int source, int destination) {
4646
* @param destination The ending vertex of the path search.
4747
* @return A list containing all the found paths represented as lists of vertex indices.
4848
*/
49-
private List<List<Integer>> findAllPaths(int source, int destination) {
49+
private List<List<Integer>> findAllPathsStart(int source, int destination) {
5050
boolean[] visited = new boolean[vertexCount];
5151
List<Integer> currentPath = new ArrayList<>();
5252
currentPath.add(source);
@@ -94,6 +94,6 @@ public static List<List<Integer>> findAllPaths(int vertices, int[][] a, int sour
9494
for (int[] i : a) {
9595
g.addEdge(i[0], i[1]);
9696
}
97-
return g.findAllPaths(source, destination);
97+
return g.findAllPathsStart(source, destination);
9898
}
9999
}

0 commit comments

Comments
 (0)