Skip to content

Commit 1aec66f

Browse files
committed
Fix generic type warnings in TwoSat.java
1 parent 05cf9c1 commit 1aec66f

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/com/thealgorithms/datastructures/graphs

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/datastructures/graphs/TwoSat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public TwoSat(int numberOfVariables) {
9898
this.numberOfVariables = numberOfVariables;
9999
int n = 2 * numberOfVariables + 1;
100100

101-
graph = new ArrayList[n];
102-
graphTranspose = new ArrayList[n];
101+
graph = (ArrayList<Integer>[]) new ArrayList[n];
102+
graphTranspose = (ArrayList<Integer>[]) new ArrayList[n];
103103
for (int i = 0; i < n; i++) {
104104
graph[i] = new ArrayList<>();
105105
graphTranspose[i] = new ArrayList<>();

0 commit comments

Comments
 (0)