I am studying a Big-O example but I just do not get the idea. I have already seen that this question was asked in this forum but I am still confused. Can someone please provide another explanation so I can have more options to analyze? My main question in the part that says "Because each of the integers in the sum of the first n positive integers does not exceed n". How can I get to this reasoning?
The problem is as follows:
How can big-O notation be used to estimate the sum of the first n positive integers? Solution: Because each of the integers in the sum of the first n positive integers does not exceed n, it follows that 1 + 2+· · ·+n ≤ n + n+· · ·+n = n2. From this inequality it follows that 1 + 2 + 3+· · ·+n is O(n2), taking C = 1 and k = 1 as witnesses. (In this example the domains of the functions in the big-O relationship are the set of positive integers.)