49
edits
Changes
→Profiling: bubble vs quick algorithm
Source code
void BubbleSort(int arr[], int size) {
int tmp; /*used for swapping*/
int i;
}
}
} void InsertionSort(int arr[], int left, int right) {
int curr;
int i, j;
arr[j] = curr;
}
} void QuickSort(int arr[], int left, int right) {
if (right - left <= 3) {
InsertionSort(arr, left, right);
QuickSort(arr, i + 1, right);
}
} void QuickSort(int arr[], int size) {
QuickSort(arr, 0, size - 1);
}