I have the following quick sort algorithm:
int quicksort(int data[], size_t n, int &counter) // Library facilities used: cstdlib { size_t pivot_i