1,664 views
1 votes
1 votes

$\sum(range -> 1<=k<=n) O(n)$, where O(n) stands for order n is -

a) O(n)                b)   O(n2)

c)  O(m3)       d) O(3n2)

1 Answer

2 votes
2 votes

Yes,'K' is used as follows:

1<= k<= n => we have add O(n) 'n' times since 'k' is 1 to n. 'K' is like iterator .

Hence : O(n) +O(n) +O(n) +...........n times  =  nO(n) = O(n2)

Hence ans: (b)

Answer:

Related questions

0 votes
0 votes
0 answers
1
usdid asked Apr 16, 2022
267 views
a) what is the iterative equation showing the running time of the algorithm whose pseudocode is given below? b) What is this repeated equation in asymptotic notation usin...
0 votes
0 votes
1 answer
2
piyushkr asked Dec 31, 2015
308 views
n^(1/(2^(log2log2n)))
2 votes
2 votes
1 answer
3