Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. void modyfiedQuickSort(int arr[], int l, int h, int order, int* compares, int* swaps) {
  2.         if(h - l < 16){
  3.             insertionSort(&arr[l], h-l+1, order, compares, swaps);
  4.         } else if (l < h) {
  5.                 int p = modyfiedPartition(arr, l, h, order, compares, swaps);
  6.                
  7.                 modyfiedQuickSort(arr, l, p - 1, order, compares, swaps);
  8.                 modyfiedQuickSort(arr, p + 1, h, order, compares, swaps);
  9.         }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement