quick sort exercise