Implementation of popular sorting algorithms.