We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7d9874 commit e2dcebaCopy full SHA for e2dceba
2SAT/TwoSAT.java
@@ -51,7 +51,7 @@ public boolean[] answer() {
51
}
52
53
private void rangeCheck(int x) {
54
- if (0 < x || x >= n) {
+ if (x < 0 || x >= n) {
55
throw new IndexOutOfBoundsException(
56
String.format("Index %d out of bounds for length %d", x, n)
57
);
0 commit comments