Skip to content

Instantly share code, notes, and snippets.

Scientits

Block or report user

Report or block Scientits

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View quicksort.cpp
#include <bits/stdc++.h>
using namespace std;
/*this function: last element as pivot then places all smaller elements to the left, the others to the right*/
int partitioN(int a[], int low, int high){
int pivot = a[high]; // this is pivot
int i = (low - 1); // index of smaller elements
for(int j = low; j <= high - 1; j++){
You can’t perform that action at this time.