If $a_1,a_2\dots a_n$ and $b_1,b_2\dots b_n$ are two rearrangement of $1,2,\dots n$, Find the minimum and maximum values of $$\sum_{i=1}^na_ib_i$$
I found the maximum to be $\sum i^2$ using Cauchy-Schwarz.
Also WLOG $\sum_{i=1}^na_ib_i=\sum_{i=1}^nib_i$
How to proceed for minimum value?