public class Teste {
public static void Func(int v[], int abc, int
def) {
int esf = abc;
int xpt = def;
int x = v[(esf + xpt) / 2];
int par;
while (esf <= xpt) {
while (v[esf] < x) {
esf = esf + 1;
}
while (v[xpt] > x) {
xpt = xpt - 1;
}
if (esf <= xpt) {
par = v[esf];
v[esf] = v[xpt];
v[xpt] = par;
esf = esf + 1;
xpt = xpt - 1;
}
}
if (xpt > abc)
Func(v, abc, xpt);
if (esf < def)
Func(v, esf, def);
}
public static void main(String args[]) {
int vetor[] = { 73, 5, 17, 8, 2 };
Func(vetor, 0, vetor.length - 1);
for (int i = 0; i < vetor.length; i++) {
System.out.print(vetor[i]+"-");
}
}
}
Assinale a opção que apresenta corretamente o resultado do código Java precedente, depois de ele ser executado.