Implemented Quick Sort