wrote quickSort using median of three method