We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
void quickSort(vector &arr, int low, int high){
if(low >= high || low < 0){
return;
}
int p = partition(arr, low, high);
for(auto s : arr){
cout << s << " ";
}
cout << endl;
quickSort(arr, low, p - 1); // Left side of pivot
quickSort(arr, p + 1, high); // Right side of pivot
Quicksort In-Place
You are viewing a single comment's thread. Return to all comments →
int partition(vector &arr, int low, int high){ int pivot = arr[high];
}
void quickSort(vector &arr, int low, int high){ if(low >= high || low < 0){ return; }
}
int main() { int n; cin >> n;
}