package com.hithomelabs.princeton1.module5;

public interface ComparableSort<E> {

    void sort(E[] arr);

    default void exch(E[] arr, int j, int i) {
        E temp = arr[i];
        arr[i] = arr[j];
        arr[j] = temp;
    }

    default boolean less(Comparable<E> e1, E e2) {
        return e1.compareTo(e2) < 0;
    }

}
