The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

0 votes

Can you please find time complexity of the recurrence using Variable Substitue method and Master Theroem:

What is the time complexity of the following recursive function

int recursion (int n)

{

if(n ≤ 1)

return 1;

else

return(recursion(sqrt(n)) + 1);

}

// i solved it using substitution method.

+2 votes

Best answer

- All categories
- General Aptitude 1.1k
- Engineering Mathematics 4k
- Digital Logic 1.7k
- Programming & DS 3k
- Algorithms 2.6k
- Theory of Computation 3.2k
- Compiler Design 1.2k
- Databases 2.3k
- CO & Architecture 2.1k
- Computer Networks 2.4k
- Non GATE 795
- Others 1.2k
- Admissions 244
- Exam Queries 419
- Tier 1 Placement Questions 16
- Job Queries 39
- Projects 4

29,138 questions

36,959 answers

92,026 comments

34,803 users