I'm trying to understand summation for my algorithm course and it has been a while since I took discrete math. Could any body please explain how does summation simplification work from the problem below? How did it got the result? a detailed step-by-step explanation will help me a lot. Thank you.
$$\sum_{i=1}^n (n-i+1) = \frac12n(n+1)$$