I found this link: http://theory.stanford.edu/~tim/w11/l/qsort.pdf and it kind of theoretically describes how to approach finding expectation for the number of comparisons in a Quicksort.
Using this, how would I find and prove the expectation for an array of a concrete number of items, for example 5? (see the formula in the second section of the link) Would my expectation be !https://i.imgur.com/7BIE3qj.png)! but replace the n by 5 for example (to get the expected number of comparisons for a 5 length array)
the second formula reads: !(https://i.imgur.com/66gvyjp.png)!
I understand I should just replcae the n with for example 5 if I want to find the number of comparisons expected for a concrete array, however I don't think I quite understand how the proof would apply in this case, however. I was wondering if anyone knew an easier proof for finding the expected number of comparisons in a randomized quicksort for an array of length n.