The pivot element can be chosen in various ways - randomly, the first element, the last element, or the median of three elements.