Data Structures and Algorithms - Performance Analysis of Algorithms and Recurrences

Avatto > > UGC NET COMPUTER SCIENCE > > PRACTICE QUESTIONS > > Data Structures and Algorithms > > Performance Analysis of Algorithms and Recurrences

6. f(n) is of the order of g(n) if there exist positive integers "a" and "b" such that

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


7. The running time of an algorithm T(n) where (n) is the input size is given by
    T(n) = 8T (n/2) + qn, if n > 1
            p, if n = 1
where p, q are constants. The order of the algorithm is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


8. The running time T(n), where (n) is the input size of a recursive algorithm is given as follows :
    T(n) = C + T(n - 1); if n > 1
      = d, if n ≤ 1
The order of the algorithm is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


9. Consider following two functions
  f(n) = n3, if 0 ≤ n < 10,000
     n2, otherwise
  g(n) = n, if 0 ≤ n < 100
     n2 + 5n, otherwise
Which of the following are true?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


10. The complexity of comparison based sorting algorithms is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *