filmov
tv
Maximum Value After Rearrangement | GFG | POTD #coding #geeksforgeeks #datastructure #programming
Показать описание
Given an array arr of n integers. Your task is to write a program to find the maximum value of ∑arr[i]*i, where i = 0, 1, 2,., n-1. You are allowed to rearrange the elements of the array.
Note: Since the output could be large, print the answer modulo 109+7.
#shorts #sorting
Note: Since the output could be large, print the answer modulo 109+7.
#shorts #sorting