in Algorithms
547 views
1 vote
1 vote

Loading Question

in Algorithms
547 views

2 Comments

Hey guys ignore the options. What will be the answer by solving the relation?
0
0

more appropriate O(qn).

2
2

2 Answers

2 votes
2 votes

since p and q are constant ...q can have maximum constant value can go upto n....so the second part of the recurrence will give higher order .

so the order can be n^n(option b)

by
0 votes
0 votes
we can apply master theoram

a=8 b=2

k=0

a>b^k

so TC= O(n^3)
by

4 Comments

You'r doing it wrong.
Why didn't you considered term $q^n$.

Let, q = 2;

then, $T(n)  = 8*T(\frac{n}{2}) + 2^n$, which is upper-bounded by $n^n$ only.
0
0

Should not option is O(qn). since we dont take heigher value for big-oh.

0
0

question is wrong . If it was qn inplace of qn, then C is right .

otherwise O( qn) is more appropriate.

0
0

Agree O( 2n) is far far less than O(nn) . 

0
0