After reading Why is the probability of two elements $y_i$, $y_j$ being compared equal to $2/(j - i + 1)$ in random quicksort?
I am confused as to what $j-i+1$ means in the denominator.
Is it the same as saying $$\frac{2}{\text{the total number of elements}}?$$ Isn't that a more simple notation as well?