292 views
1 votes
1 votes

Match the following.
image:algosub15q.png

  1.   I - B, II - C, III - D, IV - D, V - A
    Explanation:
    AVL tree is balanced BST, so its height is O(log N)
    The maximum height of BST is O(N) for left or right skewed
    The time complexity of randomized quicksort and heapsort is O(N log N) in worst case
    The time complexity of bubble sort is O(N2).
  2.   I - C, II - B, III - A, IV - D, V - A
  3.   I - B, II - C, III - D, IV - A, V - C
  4.   I - B, II - B, III - D, IV - D, V - A

I think Time complexity of randomised quick sort in worst case is O(N^2).

Please correct me.

Please log in or register to answer this question.

Related questions

3 votes
3 votes
0 answers
2
ankit_thawal asked Jan 28, 2018
1,115 views
T(n) = T(n/2) + 2T(n/5) + T(n/10) + 4nWhich of the following is true? T(n) = O(n log2 n) T(n) = O(n2) T(n) = O(n log5 n) T(n) = O(n) How to solve such examples?Shoul...
2 votes
2 votes
1 answer
3
ankit_thawal asked Jan 18, 2018
503 views
#include<stdio.h>void main(){printf("Hello\b\b\b\b\b");printf("Hi!\b\b\bBye");}