quickSort with Math.random for the pivot