
You are given an integer array nums of length n .
Assume arr _k to be an array obtained by rotating nums by k positions clock-wise. We define the rotation function F on nums as follow:
F(k) = 0 arr _k [0] + 1 arr _k [1] + ... + (n - 1) * arr _k [n - 1].
Return the maximum value of F(0), F(1), ..., F(n-1) .
The test cases are generated so that the answer fits in a 32-bit integer.
n == nums.length1 <= n <= 10 ^5-100 <= nums[i] <= 100