.
how “well” the pivot is chosen. We saw that if the first element is always chosen as a pivot, the running time becomes Θ(n²), and if the median is always chosen as a pivot, it becomes Θ(n log n). A Better Way One idea that may give us better results is choosing the pivot randomly in every recursive