This commit is contained in:
@@ -15,10 +15,9 @@ public class BinarySearch3637 {
|
|||||||
a.put(Integer.parseInt(args[i]));
|
a.put(Integer.parseInt(args[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(
|
int start = searchIterativeDecreasing(x, a);
|
||||||
searchIterativeIncreasing(x, a.getReversed()) -
|
int end = searchIterativeIncreasing(x, a.getReversed());
|
||||||
searchIterativeDecreasing(x, a)
|
System.out.println(((end - start) == -1) ? 0 : (end - start));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int searchIterativeIncreasing(int x, IntList a) {
|
static int searchIterativeIncreasing(int x, IntList a) {
|
||||||
|
|||||||
Reference in New Issue
Block a user