I agree with your assumption that the average time complexity is still O(n log n) . I am not an expert and 100% sure, but these are my thoughts:
This is the quicksort pseudocode in place: (calling quicksort with l = 1 and r = array length)
Quicksort(l,r) -------------- IF rl>=1 THEN choose pivot element x of {x_l,x_l+1,...,x_r-1,x_r} order the array-segment x_l,...x_r in such a way that all elements < x are on the left side of x // line 6 all elements > x are on the right side of x // line 7 let m be the position of x in the 'sorted' array (as said in the two lines above) Quicksort(l,m-1); Quicksort(m+1,r) FI
Then, the average time complexity is analyzed, choosing "<" - comparisons in lines 6 and 7 as the dominant operation in this algorithm, and finally comes to the conclusion that the average time complexity is O (n log n). Since the cost of the string "orders the segment of the array x_l, ... x_r in such a way that ..." is not taken into account (only an important operation is important when analyzing the time complexity if you want to find the boundaries), I think "because it has to make two passes list when it breaks it, "this is not a problem, just as your version of Haskell will take about twice as much of this step. The same is true for the operation application, and I agree that this does not add anything to the asymptotic costs:
Since the addition and section still have linear time complexity, even if they are inefficient.
For convenience, suppose this adds “n” to our time complexity costs, so that we have “O (n log n + n)”. Since there is a positive integer o so that n log n> n for all positive integers greater than o, it is true that you can evaluate n log n + n from above by 2 n log n and from below by n log n, therefore n log n + n = O (n log n).
In addition, the choice of the first element as a bar is not the best choice.
I think that the choice of the rotation element does not matter here, because in the average case analysis you assume a uniform distribution of elements in the array. You cannot know from which place in the array you should select it, and therefore you need to consider all these cases in which your rotation element (no matter where in the list you receive it) is the ith smallest element of your list, for i = 1 ... r.