aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer Science (GATE Exam) 2007 - Previous Question Paper Solution
  • What is the time complexity of the following recursive fu...
Multiple choice

What is the time complexity of the following recursive function? Int Do Something (int n) { return 1; else return (Do Something (floor sqrt (n))) + n);

  1. $\odot$(n2)
  2. $\odot$(n log2 n)
  3. $\odot$(log2 n)
  4. $\odot$(log2 log2 n)
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Keep practicing — related questions

  • What is the time complexity of the following recursive function? Int Do Something (int n) { return 1; else ...
  • In the following C function, let n $\ge$ m. Int gcd (n,m) { if (n% m ==0) return m; n = n %m; return gcd (m...
  • The time complexity of the following C function is (assume n > 0) ![](https://i.imgur.com/5OlQsTq.png)
  • What is time complexity of fun()? int fun(int n) { int count = 0; for (int i = 0; i < n; i++) for (int j = ...
  • In the following C function, let n $\ge$ m. Int gcd (n,m) { if (n% m ==0) return m; n = n %m; return gcd (m...
  • What is time complexity for the following function? public void printAllPossibleOrderedPairs ( int[] arrayO...
  • Consider the following C functions: int f1 (int n) { If(n == 0 | |n == 1) return n; else return(2*f1(n-1) +...
  • Which of the following statements is/are correct? a. Rigveda was composed by people living along the Indus ...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Data Structures and Algorithms (1518 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy