# Data Structures and Algorithms Multiple Choice Questions - Set 9

81.       The number of edges in a simple, n-vertex, complete graph is
(A) n*(n-2)
(B) n*(n-1)
(C) n*(n-1)/2
(D) n*(n-1)*(n-2)
82.       Match the following:
List - I
i. Bubble Sort
ii. Shell Sort
iii. Selection Sort
List - II
a. ÎŸ(n)
b. ÎŸ(n2)
c. ÎŸ(n log n)
(A) i → a,  ii → b,  iii → c
(B) i → b,  ii → c,  iii → a
(C) i → a,  ii → c,  iii → b
(D) i → b,  ii → a,  iii → c
83.       A double sub-scripted array declared as int a[ 3 ][ 5 ]; has how many elements?
(A) 15
(B) 13
(C) 10
(D) 8
84.       The largest and the second largest number from a set of n distinct numbers can be found in
(A) O(n)
(B) O(2n)
(C) O(n2)
(D) O(log n)
85.       To implement Sparse matrix dynamically, the following data structure is used
(A) Trees
(B) Graphs
(C) Priority Queues

86.       The depth dn, of complete binary tree of n nodes, where nodes are labelled from 1 to n with root as node 1 and last leaf node as node n is
87.       Which file open mode would be used to write data only to the end of an existing file?
(A) ios::app
(B) ios::in
(C) ios::out
(D) ios::trunc
88.       The balance factor for an AVL tree is either
(A) 0,1 or -1
(B) -2,-1 or 0
(C) 0,1 or 2
(D) All the above
89.       Tower of Hanoi is a classic example of ..............
(A) divide and conquer
(B) recursive approach
(C) (B) but not (A)
(D) Both (A) & (B)