Naive QuickSort algorithm implementation