class StupidSort {

	public static int[] stupidSort(int[] array, Comparator<Integer> comparator) {
		for (int i = 0; i < array.length; i++) {
			for (int j = i + 1; j < array.length; j++) {
				if (comparator.compare(array[i], array[j]) > 0) {
					swap(array, i, j);
				}
			}
		}

		return array;
	}

}