added solution for QuickSort