#include
#include
#include
#include
#include
using namespace std;
// Exchange two elements in an array
void exchange(int arr[], int i, int j) {
int tmp=arr;
arr=arr[j];
arr[j]=tmp;
}
// Partition an array and return the partition point
int partition(int arr[], int begin, int end)
{
int pivot = arr[end];
int i = begin-1;
int j;
for(j=begin;j |