GoConqr has a new look! Let us know what you think.

Quiz

database final

Duncan Levings 75 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (75)

  1. 1Given an array where numbers are in range from 1 to n6, which sorting algorithm can be used to sort these numbers in linear time?
    1. Ainsertion sort
    2. Bquick sort
    3. Cradix sort
    4. Dnot possible
  2. 2Which is the best sorting algorithm to use for the elements in array that is more than 1 million?
    1. Amerge sort
    2. Bbubble sort
    3. Cquick sort
    4. Dinsertion sort
  3. 3Consider a situation where swap operation is very costly, which of the following sorting algorithms should be preferred so that the number of swap operations are minimized?
    1. AHeap sort
    2. BSelection sort
    3. Cinsertion sort
    4. Dmerge sort
  4. 4Suppose we have an O(n) time algorithm that finds median of an unsorted array. Now consider a quicksort implementation where we first find median uing the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified quicksort?
    1. AO(n^2 log n)
    2. BO(n^2)
    3. CO(n log n log n)
    4. DO(n log n)
  5. 5What is the time complexity for insertitem in an AVL tree
    1. AO(1)
    2. BO(n)
    3. CO(log n)
    4. DO(n log n)
  6. 6Assume that a mergesort algorithm in the worst case takes 30 seconds for an input size of 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
    1. A256
    2. B512
    3. C1048
    4. D2048
  7. 7Splay trees are always balanced
    1. ATrue
    2. BFalse
  8. 8Worse case performance of a splay tree is O(n)
    1. ATrue
    2. BFalse
  9. 9Which of the following sorting algorithms in its typical implementation gives best performance when applied to an array which is sorted or almost sorted (max 1 or 2 elements misplaced)
    1. Aquick sort
    2. Bheap sort
    3. Cmerge sort
    4. Dinsertion sort
  10. 10Which kind of tree makes sure the height is balanced
    1. Abinary tree
    2. Bheap tree
    3. CAVL tree
    4. Dskip list

Information

Description
Computer Science Quiz on database final, created by Duncan Levings on 17/04/2019.
Language
English
Views
4
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?