Implementations of a few sorting algorithms