private int partition(int arr[], int low,int high){
        int pivot = arr[low];
        int i = low+1;
        int j = low+1;
        while(j <= high){
            if(arr[j] < pivot){
                swap(arr,i,j);
                i++;
            }
            j++;
        }
        swap(arr,i-1,low);
        return i-1;
        
    }
http://www.geeksforgeeks.org/iterative-quick-sort/
Test case
0,1 or more elements in the array
src/com/interview/sort/IterativeQuickSort.java