Can someone explain how I wouldfigure out the big $O$ notation for this expression?
$$n+(n-1)+(n-2)...+(n-(n-1))$$
My thoughts is that it's $\mathcal{O}(n)$ because I think of all the other terms as smaller constants but I am not sure.
What if the operation had to be done twice? That is,
$$[n+(n-1)+(n-2)...(n-(n-1))] \times 2$$
Thanks