Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void FastClasi(int indice_inferior, int indice_superior) {
- |int i = indice_inferior;
- 1 |int j = indice_superior;
- |int pivote = arreglo_temp[indice_inferior+(indice_superior-indice_inferior)/2];
- |while (i <= j) {
- | |while (arreglo_temp[i] < pivote) {
- | 3| 4|i++;
- | |}
- |
- | 5|while (arreglo_temp[j] > pivote) {
- | 6|j--;
- | }
- 2 |
- | 7|if (i <= j) {
- | 8|intercambiarNumeros(i, j);
- |
- | 9|i++;
- | |j--;
- | }
- |}
- 10| if (indice_inferior < j)
- 11| FastClasi(indice_inferior, j);
- 12| if (i < indice_superior)
- 13|FastClasi(i, indice_superior);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement