First qsort method for HW 2