Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int checaVet(int size, int* array) {
- int i;
- for (i = 1; i <= size; i++)
- if (i == size)
- return 0;
- else if (array[i-1] > array[i])
- return 1;
- }
- void EstoucomSort(int size, int *array) {
- int i, j;
- while(checaVet(size, array)) {
- for (i = 0; i < size; i++) { //SORT
- j = rand() % size;
- if (array[i] != array[j])
- array[i] ^= array[j] ^= array[i] ^= array[j]; /* swap */
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement