We have to do the sum from 1 to n.
Then why sir writes it n(n-1)/2.
Because it will contradict the previous video in which sir says that O(n^2) means the complexity will never cross the values n^2.
Time Complexity using recurrence method
@a19JE0093
hello akshat ,
complexity equal to O(n^2) means complexity will never cross k*n^2 where k is some arbitrary constant.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.