retagged by
451 views

2 Answers

1 votes
1 votes

See here

A) is wrong. n2 + n can not have lower bound n.

B) well this very much wrong. For being Theta(n) , we need n to be lower bound. That is not possile

C) This is correct. n2 + n has lower bound n2 .
 D) This is wrong.n2 + n has upper bound n2

Upshot, Dont believe answers in Test series ! .

0 votes
0 votes

f(n) is greater than n. 

g(n) is grater than n2 

f(n) +g(n)= max (f(n),g(n)) = lower bound n2

Related questions

1.6k
views
2 answers
0 votes
radha gogia asked Jul 7, 2018
1,639 views
foo(int n) { for(int i=0 ; i<n ;i++) for(int j=i ; j<=i*i ;j++) if(j%i==0) { for(int k=0;k<j;k++) printf("hii"); } } How to proceed here for analyzing the time complexity ?
835
views
2 answers
2 votes
radha gogia asked Jun 28, 2018
835 views
For the below code : foo() { for(i=1;i<=n;i++) { for(j=0;j<i;j++) { for(k=0;k<j;k++) c++; } } } Here k is executing j-1 ... this is getting too large, I checked with an example, it is not matching,So please correct where I went wrong.
1.2k
views
1 answers
3 votes
Sanjay Sharma asked Feb 20, 2018
1,208 views
An array A is of length n has log( n) distinct numbers.What is the time complexity of sorting A by best comparison based algorithm ?
1.5k
views
1 answers
1 votes
Akriti sood asked Dec 22, 2016
1,517 views
What is the worst case time complexity of the following recurrence relation?T(n)=T(n/2)+T(n/4)+T(n/8)+n Θ(nlogn) Θ(n2) Θ(n)--------------- ... in this approach..??by tree method,i will get O(n).but whats wrong with this?please clear ths.