update 3637 mod solution
Some checks failed
Binary Search Test / test (push) Failing after 6s

This commit is contained in:
2026-02-17 13:01:33 +03:00
parent b841165037
commit 6d928e53f2

View File

@@ -17,7 +17,11 @@ public class BinarySearch3637 {
int start = searchIterativeDecreasing(x, a);
int end = searchIterativeIncreasing(x, a.getReversed());
System.out.println(((end - start) == -1) ? 0 : (end - start));
if (a.get(start) != x) {
System.out.println(0);
} else {
System.out.println(end - start);
}
}
static int searchIterativeIncreasing(int x, IntList a) {