Help in ZCO13001

https://www.codechef.com/viewsolution/28055543
explain the line sum=sum+(n-(2i-1))(arr[n-i]);

See the Editorial here or my solution here.

2 Likes