#include <stdio.h>

int Partition_Hoa(int arr[], int l, int r)
{
    int p = arr[(l + r) / 2];
    int i = l;
    int j = r;
    
    while (1)
	{
     //   #print(p)
        while (arr[i] <= p) i++;
        while (arr[j] > p) j--;
        
        if (i >= j) return j;
    
        swap(arr[i], arr[j]);
        i++;
        j--;
	}
}
void QuickSort(int arr[], int l, int r)
{
    if (l < r):
	{
        int s = Partition_Hoa(arr, l, r);
        QuickSort(arr, l, s-1); 
        QuickSort(arr, s+1, r); 
	}
}


int main()
{
	int arr[] = {2, 56, 10, 5, 2, 6, 9, 6, 3, 923, 3, 2, 1};
	


	return 0;
}
