4. $N$ dwarfs of heights $1,2,3,\ldots,N$ are arranged in a circle. For each pair of neighbouring dwarfs the positive difference between the heights is calculated; the sum of these $N$ differences is called the "total variance" $V$ of the arrangement.
Find (with proof) the maximum and minimum possible values of $V$.