Arithmetic Progression

Arithmetic Progression

`1 + 2 + 3 + ... + n = (n(n + 1))/2`

`n + (n-1) + (n-2) + ... + 2 + 1 = (n(n + 1))/2`

`(n^2+1)/2 => 1/2(n^2) + 1/2 => 1/2(n^2) => n^2 => O(n^2)`