Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Friday, 1 September 2017

Data Structures and Algorithms Multiple Choice Questions - Set 11

101.       Program with highest run-time complexity is ....................
(A) Tower of Hanoi
(B) Fibonacci Series
(C) Prime Number Series
(D) None of these
Answer: A
102.       The number of unused pointers in a complete binary tree of depth 5 is:
(A) 4
(B) 8
(C) 16
(D) 32
Answer: C
103.       Linear search is highly inefficient compared to binary search when dealing with:
(A) Small, unsorted arrays
(B) Small, sorted arrays
(C) Large, unsorted arrays
(D) Large, sorted arrays
Answer: D
104.       The running time for creating a heap of size n is .............
(A) O(n)
(B) O(log n)
(C) O(n log n)
(D) O(n2)
Answer: C
105.       The extra key inserted at the end of the array is called a ...............
(A) End Key
(B) Stop Key
(C) Sentinel
(D) Transposition
Answer: C
106.       Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?
(A) Deleting a node whose location is given
(B) Searching of an unsorted list for a given item
(C) Inserting a new node after node whose location is given
(D) Traversing the list to process each node
Answer: A
107.       Using square brackets ([]) to retrieve vector elements .............. perform bounds checking; using member function at to retrieve vector elements ................ perform bounds checking.
(A) Does not, does not
(B) Does not, does
(C) Does, does not
(D) Does, does
Answer: B
108.       One can determine whether a Binary tree is a Binary Search Tree by traversing it in ................
(A) Pre-order
(B) In-order
(C) Post-order
(D) Any of these
Answer: B
109.       The spanning tree of connected graph with 10 vertices contains ..............
(A) 9 edges
(B) 11 edges
(C) 10 edges
(D) 9 vertices
Answer: A
110.    What data structure is used for breadth first traversal of a graph?
(A) Queue
(B) Stack
(C) List
(D) None of these
Answer: A


No comments:

Post a Comment