
// CS410, Summer1998
// Homework 6
// Sorter.java

// With holes for you.

import java.util.*;
import java.io.*;

final class Sorter {
	
	private int switchSize; // subproblems below this size solve with insertion sort
	private boolean doShortFirst; // if true, do smaller quicksort subproblem first
	private int medianOf; // to pivot, choose this many random elements & find median

	private int [] possible; // use for finding median

	private static Random r = new Random();
	int randomInRange(int low, int high) {
		return low + (Math.abs(r.nextInt()) % (high - low + 1));
	}

	Sorter(int s, boolean d, int m) {
		switchSize = s;
		doShortFirst = d;
		medianOf = m;
		possible = new int[m];
	}

	int pickPivot(Sortable[] toSort, int low, int high) {
		// for you
	}

	void insertionsort(Sortable [] toSort, int low, int high) {
		// for you
	}

	int partition(Sortable [] toSort, int low, int high) {
		// for you
	}
	
	void quicksort(Sortable [] toSort, int low, int high) {
		// for you
	}

	public void sort(Sortable [] toSort) {
		quicksort(toSort, 0, toSort.length - 1);
	}

}
