Class OddEvenSortAlgorithm
- java.lang.Object
-
- org.hortonmachine.gears.utils.sorting.OddEvenSortAlgorithm
-
public class OddEvenSortAlgorithm extends Object
-
-
Constructor Summary
Constructors Constructor Description OddEvenSortAlgorithm()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)static voidoddEvenSort(double[] arrayToBeSorted, double[] arrayThatFollowsTheSort)Sorts two arrays regarding to the sort of the firststatic voidoddEvenSort(List<Double> listToBeSorted, List<Double> listThatFollowsTheSort)Sorts two lists regarding to the sort of the first
-
-
-
Method Detail
-
oddEvenSort
public static void oddEvenSort(double[] arrayToBeSorted, double[] arrayThatFollowsTheSort)Sorts two arrays regarding to the sort of the first- Parameters:
arrayToBeSorted- the array on wich the sort is performedarrayThatFollowsTheSort- the array that is sorted following the others array sort. Can be null
-
oddEvenSort
public static void oddEvenSort(List<Double> listToBeSorted, List<Double> listThatFollowsTheSort)
Sorts two lists regarding to the sort of the first- Parameters:
listToBeSorted- the array on wich the sort is performedlistThatFollowsTheSort- the array that is sorted following the others list sort. Can be null, in which case it acts like a normal sorting algorithm
-
main
public static void main(String[] args)
-
-