Best order to maximise the value – GeeksforGeeks
Given, an array arr of N integers, the task is to select some integers from this array arr and arrange them in another array brr, such that the sum of brr*(i+1) for every index in array brr is maximum. Find out the maximum possible such…