Implemented Quick sort.