Skip to content

Commit 857b074

Browse files
committed
Fixed SpotBugs issue
1 parent 587bd7e commit 857b074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/thealgorithms/others/MosAlgorithm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public int compare(Query a, Query b) {
198198

199199
// For odd blocks, sort right in ascending order
200200
// For even blocks, sort right in descending order (optimization)
201-
if (blockA % 2 == 1) {
201+
if ((blockA & 1) == 1) {
202202
return Integer.compare(a.right, b.right);
203203
} else {
204204
return Integer.compare(b.right, a.right);

0 commit comments

Comments
 (0)