
        return array;
    }

//    private int partition(Integer [] array,int pivotIndex,int leftPointer,int rightPointer) { //used partition process
//        while (rightPointer>leftPointer) {
//            while (array[leftPointer] <= array[pivotIndex]) {
//                leftPointer++;
//            }
//
//            while (array[rightPointer] > array[pivotIndex]) {
//                rightPointer--;
//            }
//        if(leftPointer<rightPointer) {