private static double compare(String alg1, String alg2, int N, int T,
			String inputType, String dataType)
	{
		Comparable[] a = new Comparable[N];
		Comparable[] b = new Comparable[N];

		try
		{
			SortHelper.class.getMethod("put" + inputType + "Input",
					Comparable[].class).invoke(null, (Object) a);
		}
		catch (Exception e)
		{
			System.out.println(e);
			System.out.println(e.getCause());
			System.exit(1);
		}

		System.arraycopy(a, 0, b, 0, N);
		double total1 = 0.0;
		double total2 = 0.0;

		for (int t = 0; t < T; t++)
		{ // Perform one experiment (generate and sort an array).
			total1 += time(alg1, a);
			// System.out.println(alg1 + " : " + total1);
			total2 += time(alg2, b);
			// System.out.println(alg2 + " : " + total2);
		}
		return total2 / total1;
	}