public static void main(String args[]) {
        int input[] = {10, 1, 2, 3, 4, 5, 6, 7, 8, 9};
        RotationWithMaxSum rms = new RotationWithMaxSum();
        System.out.print(rms.maxSum(input));
    }
Date 12/30/2015
@author Tushar Roy

Given an input array find which rotation will give max sum of i * arr[i]

Time complexity - O(n)
Space complexity - O(1)

http://www.geeksforgeeks.org/find-maximum-value-of-sum-iarri-with-only-rotations-on-given-array-allowed/
src/com/interview/array/RotationWithMaxSum.java