Considere a classe Java abaixo.
public class Procura {
public static void main(String[] args) {
int k[] = {8, 44, 45, 70, 72, 95};
int n = k.length;
int x = 70;
System.out.print(busca);
}
static int busca(int a, int b, int v[]) {
int e = -1, d = b;
while (e < d - 1) {
int t = (e + d) / 2;
if () {
e = t;
} else {
d = t;
}
}
return d;
}
}
Fonte: ANALISTA DE FOMENTO - TECNOLOGIA DA INFORMAçãO / AFAP / 2019 / FCC