Various sorting algorithms and methods for reference.