Class SortingAlgorithms

java.lang.Object
velo.ladaalpha.misc.SortingAlgorithms

public class SortingAlgorithms extends Object
The Class SortingAlgorithms.
  • Constructor Details

    • SortingAlgorithms

      public SortingAlgorithms()
  • Method Details

    • insertionSort

      public static double[] insertionSort(double[] arr)
      Insertion sort.
      Parameters:
      arr - the arr
      Returns:
      the double[]
    • bubbleSort

      public static double[] bubbleSort(double[] arr)
      Bubble sort.
      Parameters:
      arr - the arr
      Returns:
      the double[]
    • selectionSort

      public static double[] selectionSort(double[] arr)
      Selection sort.
      Parameters:
      arr - the arr
      Returns:
      the double[]
    • mergeSort

      public static double[] mergeSort(double[] array, int lowval, int highval)
      Merge sort.
      Parameters:
      array - the array
      lowval - the lowval
      highval - the highval
      Returns:
      the double[]