You are given an integer n. Count the sum of 1+2+...+n in o(n), o(n2).
Answers
Answered by
1
Sum = n(n+1)/2
Hope this will help u... :-)
Hope this will help u... :-)
Answered by
5
Heyaa...
For counting the sum there is a formula
=> n ( n + 1 )/2
Where n is the given number
Thanks
For counting the sum there is a formula
=> n ( n + 1 )/2
Where n is the given number
Thanks
Similar questions