public static void main(String[] args) throws IOException {

		File f = new File("src/QuickSort.txt");
		Scanner s = new Scanner(f);
		int n = 0;

		while (s.hasNext()) {

			array[n] = s.nextInt();
		//	System.out.print(array[i] + "\n");

			n++;
		}
      n = array.length-1;
		QuickSrtusingfirstpivot(0,n);
	//	Quicksortusinglastpivot(0,n);
		//quicksortusingmedianpivot(0,n);
		// BruteForceMethod();
for(int i1=0;i1<n+1;i1++){
	System.out.print(array[i1] + "\n");
}
System.out.print(counter);
	}