aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Algorithm Time Complexity Analysis
  • Directions: Find the time complexities of the following q...
Multiple choice

Directions: Find the time complexities of the following question.

T(n)= 2T(n/2)+n

  1. O(n2)

  2. O(n log n)

  3. O(n)

  4. O(log n)

Reveal answer Fill a bubble to check yourself
A Correct answer

Keep practicing — related questions

  • Consider the following two functions. What are time complexities of the functions? int fun1(int n) { if (n ...
  • You should add the static keyword in the place of ? in Line ________ in the following code: 1 public class ...
  • 5) void swap(int &, int &); void main() { int a=10, b=20; swap(a++,b++); printf(“\n%d\t%d\t”,a,b); } void s...
  • What will be the result of executing the following code? 1. boolean a = true; 2. boolean b = false; 3. bool...
  • Given: 3. class A { } 4. class B extends A { } 5. public class ComingThru { 6. static String s = "-"; 7. pu...
  • What is time complexity of fun()? int fun(int n) { int count = 0; for (int i = 0; i < n; i++) for (int j = ...
  • Pipe A can fill in 20 minutes and Pipe B in 30 mins and Pipe C can empty the same in 40 mins.If all of them...
  • Directions: Un-jumble the following words to form a sentence. (A) children /(B) the /(C) were /(D) the anim...
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