Class OddEvenSortAlgorithm


  • public class OddEvenSortAlgorithm
    extends Object
    • Constructor Detail

      • OddEvenSortAlgorithm

        public OddEvenSortAlgorithm()
    • 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 performed
        arrayThatFollowsTheSort - 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 performed
        listThatFollowsTheSort - 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)