recategorized by
1,234 views

3 Answers

0 votes
0 votes
According to Master's theorem
T(n) =aT(n/b) + nc
a=2, b=2
nc = √n => nc = n1/2 => c=1/2
1. if logba < c, T(n) = Θ(nc),
2. if logba = c, T(n) = Θ(nc log n),
3. if logba > c, T(n) = Θ(nlogba).
Here logba > c, So T(n)= Θ(nlogba)= Θ(n1)= Θ(n)
Answer:

Related questions

2 votes
2 votes
2 answers
1
0 votes
0 votes
1 answer
2
Sanjay Sharma asked May 9, 2016
1,801 views
The time complexities of some standard graph algorithms are given. Match each algorithm with its time complexity ? ($n$ and $m$ are no. of nodes and edges respectively)$\...
1 votes
1 votes
1 answer
4
go_editor asked Jul 13, 2016
2,996 views
A* algorithm is guaranteed to find an optimal solution ifh’ is always 0g is always 1h’ never overestimates hh’ never underestimates h