retagged by
514 views
1 votes
1 votes

I don't understand How?

retagged by

1 Answer

Best answer
1 votes
1 votes

let a function g(n) , then O(g(n)) will  include set of all function smaller or same order of the growth as g(n) .

now if the g(n)= n2    then O(n2) includes  O(1) ,O(n) ,O(nlogn)    etc...

selected by

Related questions

0 votes
0 votes
1 answer
1
sushmita asked Sep 28, 2018
917 views
Find the complexity of the following code fragment:int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
1 votes
1 votes
2 answers
2
sushmita asked Sep 28, 2018
775 views
Find the complexity of the following function when called with some integer n:void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k ...
0 votes
0 votes
2 answers
3
sushmita asked Sep 28, 2018
851 views
FIND THE TIME COMPLEXITYint i=1,j; for(;i <= n;i + +) { for(j = i; j <= nlogn; j∗= 2) { sum++; } }
1 votes
1 votes
1 answer
4
Shubhanshu asked May 9, 2017
653 views
How the worst case of merge sort is O(n^2) according to the given MIT assignment pdf:-explain ?