Implemented the quicksort sorting algorithm