Deltax
Q 1 - For a binary search algorithm to work, it is necessary that the array (list) must be
A - sorted
B - unsorted
C - in a heap
D - popped out of stack
Q 2 - Queue data structure works on
A - LIFO
B - FIFO
C - FILO
D - none of the above
Q 3 - Which of the following asymptotic notation is the worst among all?
A - Ο(n+9378)
B - Ο(n3)
C - nΟ(1)
D - 2Ο(n)
Q 4 - What could be the worst case height of an AVL tree?
A - 0.97 log n
B - 2.13 log n
C - 1.44 log n
D - n2 log n
Q 5 - Graph traversal is different from a tree traversal, because
A - trees are not connected.
B - graphs may have loops.
C - trees have root.
D - None is true as tree is a subset of graph.
Q 6 - Match the following −
(1) Bubble Sort (A) Ο(n)
(2) Shell Sort (B) Ο(n2)
(3) Selection Sort (C) Ο(n log n)
A - 1 → A, 2 → B, 3 → C
B - 1 → B, 2 → C, 3 → A
C - 1 → A, 2 → C, 3 → B
D - 1 → B, 2 → A, 3 → C
Q 7 - Which of the following uses memoization?
A - Greedy approach
B - Divide and conquer approach
C - Dynamic programming approach
D - None of the above!
Q 8 - Heap is an example of
A - complete binary tree
B - spanning tree
C - sparse tree
D - binary search tree
Q 9 - If locality is a concern, you can use _______ to traverse the graph.
A - Breadth First Search
B - Depth First Search
C - Either BFS or DFS
D - None of the above!
Q 10 - If the data collection is in sorted form and equally distributed then the run time
complexity of interpolation search is −
A - Ο(n)
B - Ο(1)
C - Ο(log n)
D - Ο(log (log n))