Sorting algorithm interface