Imagem de fundo

//start –> Starting index, end --> Ending indexQuicksort(array, start, end){_ if ...

//start –> Starting index, end --> Ending index

Quicksort(array, start, end)

{

_ if (start < end)

__{

___pIndex = Partition(A, start, end)

___Quicksort(A,start,pIndex-1)

___Quicksort(A,pIndex+1, end)

__}

_}


partition (array, start, end)

{

__// Setting rightmost Index as pivot

__pivot = arr[end];


__i = (start - 1) // Index of smaller element and indicates the

__________// right position of pivot found so far

_for (j = start; j <= end- 1; j++)

___{

____// If current element is smaller than the pivot

____if (arr[j] < pivot)

____{

_____i++; // increment index of smaller element

_____swap arr[i] and arr[j]

__}

_}

_swap arr[i + 1] and arr[end])

_return (i + 1)

}


Considerando as rotinas apresentadas, escritas em pseudocódigo, assinale a alternativa que indica o que faz numa lista de números inteiros.


A

Erro


B

Ordenação decrescente


C

Ordenação crescente


D

Soma os números da lista


E

Produto dos números da lista