##
Maximum sum of i*arr[i] among all rotations of a given array
July 27, 2016

Given an array arr[] of n integers, find the maximum that maximizes sum of value of i*arr[i] where i varies from 0 to n-1. Examples: Input : arr[] = {8, 3, 1, 2} Output : 29 Explanation : Let us see all rotations {8, 3, 1, 2} = 8*0 + 3*1 + 1*2 + 2*3… Read More »