public static int partition(int[] array, int start, int end){
		int key = array[start];      // choose the first element as the prvit
		int i = end;               
		for(int j = end; j > start;j--){  // from the end to the first  find the element biger than the privt
			if(array[j] > key){
				exchange(array,i,j);      //if the element biger than the element exchange the 2 elements
				i--;
			}
		}
		exchange(array,start,i);   // put the element to the right position
		return i;
	}