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