Package algs21

Class Insertion

java.lang.Object
algs21.Insertion

public class Insertion extends Object
  • Field Details

    • COUNT_OPS

      private static boolean COUNT_OPS
  • Constructor Details

  • Method Details

    • sort

      public static <T extends Comparable<? super T>> void sort(T[] a)
    • sort

      public static <T> void sort(T[] a, Comparator<? super T> c)
    • indexSort

      public static <T extends Comparable<? super T>> int[] indexSort(T[] a)
    • less

      private static <T extends Comparable<? super T>> boolean less(T v, T w)
    • exch

      private static <T> void exch(T[] a, int i, int j)
    • less

      private static <T> boolean less(Comparator<? super T> c, T v, T w)
    • exch

      private static void exch(int[] a, int i, int j)
    • isSorted

      private static <T extends Comparable<? super T>> boolean isSorted(T[] a)
    • isSorted

      private static <T extends Comparable<? super T>> boolean isSorted(T[] a, int lo, int hi)
    • isSorted

      private static <T> boolean isSorted(T[] a, Comparator<? super T> c)
    • isSorted

      private static <T> boolean isSorted(T[] a, Comparator<? super T> c, int lo, int hi)
    • show

      private static <T> void show(T[] a)
    • main

      public static void main(String[] args)