Implementations of different sorting algorithms