Implementation of different sorting algorithms