Basic implementations of different sorting algorithms.