Computer Science  Data Structures
Quizsummary
0 of 119 questions completed
Questions:
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
Information
This is MCQs of Computer Science Subject.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 119 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
 Not categorized 0%
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 Answered
 Review

Question 1 of 119
1. Question
Consider the following tree
pic ?
If the post order traversal gives a b c d * + then the label of the nodes 1, 2, 3, … will beCorrect
Incorrect

Question 2 of 119
2. Question
Consider the following tree.
pic ?
If this tree is used for sorting, then a new number 8 should be placed as theCorrect
Incorrect

Question 3 of 119
3. Question
The initial configuration of a queue is a, b, c, d, (‘a’ is in the front end). To get the configuration d, c, b, a, one needs a minimum of
Correct
Incorrect

Question 4 of 119
4. Question
The number of possible*ordered trees with 3 nodes A, B, C is
Correct
Incorrect

Question 5 of 119
5. Question
The number of swappings needed to sort the number 8, 22, 7, 9, 31, 19, 5, 13 in a ascending order, using bubble sort is
Correct
Incorrect

Question 6 of 119
6. Question
Given two sorted list of size ‘m’ and ‘n’ respectively. The number of comparisons needed is the worst case by the merge sort algorithm will be
Correct
Incorrect

Question 7 of 119
7. Question
If the sequence of operations – PUSH (1), PUSh (2), PoP , PUSH (1), PUSH (2), PoP, PoP, PoP, PUSH (2), PoP, are performed on a stack, the sequence of popped out values are
Correct
Incorrect

Question 8 of 119
8. Question
A hash table with 10 buckets with one slot per bucket is depicted in Fig 9.3
The symbols, S1, to S7 are initially entered using a hashing function with linear probing. The maximum number of comparisons needed in searching an item that is not present isCorrect
Incorrect

Question 9 of 119
9. Question
A binary tree in which every nonleaf node has nonempty left and right subtrees is called strictly binary tree. Such a tree with 10 leaves
Correct
Incorrect

Question 10 of 119
10. Question
The depth of a complete binary tree with ‘n’ nodes is (log is to the base two)
Correct
Incorrect

Question 11 of 119
11. Question
Preorder is same as
Correct
Incorrect

Question 12 of 119
12. Question
Which of the following traversal techniques lists the nodes of a binary search tree in ascending order?
Correct
Incorrect

Question 13 of 119
13. Question
The average successful search time taken time taken by binary search on a sorted array of 10 items is
Correct
Incorrect

Question 14 of 119
14. Question
A hash function f defined as f (key) = key mod 7, with linear probing, is used to insert be the location of key 11?
Correct
Incorrect

Question 15 of 119
15. Question
The average successful search time for sequential search on ‘n’ items is
Correct
Incorrect

Question 16 of 119
16. Question
The running time of an algorithm T(n), Where ‘n’ is the input size is givn by
T(n) = 8T(n/2) + qn, if n > 1
p, if n = 1
Where p, q are constants. The order of this algorithm isCorrect
Incorrect

Question 17 of 119
17. Question
Let m, n be positive integers. Define Q (m,n) as
Q(m,n) = 0, if m < n Q(mn,n) + p, if m ≥ n Then Q(m,3) is (a div b, gives the quotient when a is divided by b)Correct
Incorrect

Question 18 of 119
18. Question
Six files F1, F2, F3, F4, F5 and F6 have 100, 200, 50, 80, 120, 150 number of records respectively. In what order should they be stored so as to optimize access time? Assume each file is accessed with the same frequency
Correct
Incorrect

Question 19 of 119
19. Question
In Qn. 18, the average access time will be
Correct
Incorrect

Question 20 of 119
20. Question
An algorithm is made up of 2 modules M1 and M2, If order of M1 is f (n) and M2 is g (n) then the order of the algorithm is
Correct
Incorrect

Question 21 of 119
21. Question
The concept of order (Big O) is important because
Correct
Incorrect

Question 22 of 119
22. Question
The running time T(n) where ‘n’ is the input size of a recursive algorithm is given as follows
T(n) = c + T(n – 1), if n > 1
d, if n ≤ 1
The order of this algorithm isCorrect
Incorrect

Question 23 of 119
23. Question
There are 4 different algorithms A1, A2, A3, A4, to solve a given problem with the order log (n) , log (log (n) ), nlog (n), n/log(n) respectively. Which of the best algorithm
Correct
Incorrect

Question 24 of 119
24. Question
The number of possible binary trees with 3 nodes is
Correct
Incorrect

Question 25 of 119
25. Question
The number of possible binary trees with 4 nodes is
Correct
Incorrect

Question 26 of 119
26. Question
The time complexity of an algorithm T(n), where n is the input size is given by
T(n) = T(n – 1) + 1/n, if n > 1
1, otherwise
The order of this algorithm isCorrect
Incorrect

Question 27 of 119
27. Question
Sorting is useful for
Correct
Incorrect

Question 28 of 119
28. Question
Choose the correct statements.
Correct
Incorrect

Question 29 of 119
29. Question
A sorting technique that guarantees, that records with the same primary key occurs in the same order in the sorted list as in the original unsorted list is said to be
Correct
Incorrect

Question 30 of 119
30. Question
A text is made up of the characters a, b, c, d, e each occurring with the probability 12, 4,15, .08 and .25 respectively. The optimal coding technique will have the average length of
Correct
Incorrect

Question 31 of 119
31. Question
In the previous question, which of the following characters will have codes of length 3?
Correct
Incorrect

Question 32 of 119
32. Question
The running time of an algorithm is given by
T(n) = T(n – 1)+ T(n 2) – T(n – 3), if n > 3
n, otherwise.
The order of this algorithm isCorrect
Incorrect

Question 33 of 119
33. Question
What should be the relation between T(1) T(2) and T(3) so that Qn, 32, gives an algorithm whose order is constant?
Correct
Incorrect

Question 34 of 119
34. Question
The Ackermann’s function
Correct
Incorrect

Question 35 of 119
35. Question
The order of an algorithm that finds whether a given Boolean function of ‘n’ variables, produces a 1 is
Correct
Incorrect

Question 36 of 119
36. Question
In evaluating the arithmetic expression 2*3 – (4 + 5), using stacks to evaluate its equivalent postfix form. Which of the following stack configuration is not possible?
[ ] [ ] [ ] [ ]
(a) [ ] (b) [5] (c) [ ] (d) [9]
[4] [4] [9] [3]
[6] [6] [6] [2]Correct
Incorrect

Question 37 of 119
37. Question
The way a card game player arranges his cards as he picks them up one by one, is an example of
Correct
Incorrect

Question 38 of 119
38. Question
You want to check whether a given set of items is sorted. Which of the following sorting methods will be the most efficient if it is already in sorted order?
Correct
Incorrect

Question 39 of 119
39. Question
The average number of comparisons performed by the marge sort algorithm, in merging two sorted lists of length 2 is
Correct
Incorrect

Question 40 of 119
40. Question
Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficiency?
Correct
Incorrect

Question 41 of 119
41. Question
You are asked to sort 15 randomly generated numbers. You should prefer
Correct
Incorrect

Question 42 of 119
42. Question
As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be
Correct
Incorrect

Question 43 of 119
43. Question
The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is a 4 digit decimal number)
Correct
Incorrect

Question 44 of 119
44. Question
Which of the following algorithms exhibits the unnatural behavior that, minimum number of comparisons are needed if the list to be sorted is in the reverse order and maximum number of comparisons are needed if they are already in sorted order?
Correct
Incorrect

Question 45 of 119
45. Question
Which of the following sorting algorithm has the worst time complexity of nlog(n)?
Correct
Incorrect

Question 46 of 119
46. Question
Which of the following sorting methods sorts a given set of items that is already in sorted order or in reverse sorted order with equal speed?
Correct
Incorrect

Question 47 of 119
47. Question
Which of the following algorithms solves the allpair shortest path problem?
Correct
Incorrect

Question 48 of 119
48. Question
Consider the graph in fig 9.4
pic ?
The third row in the transitive closure of the above graph isCorrect
Incorrect

Question 49 of 119
49. Question
The eccentricity of node labeled 5 in the graph in fig 9.5 is
pic ?Correct
Incorrect

Question 50 of 119
50. Question
The center of the graph in Qn. 49 is the node labeled
pic ?Correct
Incorrect

Question 51 of 119
51. Question
Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of stack B can only be printed. In this arrangement, Which of the following of a, b, c is not possible?
Correct
Incorrect

Question 52 of 119
52. Question
In the previous proble. if the stack A has 4 entries, then the number of possible permutation will be
Correct
Incorrect

Question 53 of 119
53. Question
The information about an array that is used in a program will be stored in
Correct
Incorrect

Question 54 of 119
54. Question
Which of the following expressions accesses the (ij)th entry of a (m x n) matrix stored column major form?
Correct
Incorrect

Question 55 of 119
55. Question
Sparse matrices have
Correct
Incorrect

Question 56 of 119
56. Question
In which of the following cases, linked list implementation of sparse matrices consumes the same memory space as the conventional way of storing the entire array?
(Assume all datatypes need the same amount of storage.)Correct
Incorrect

Question 57 of 119
57. Question
The linked list implementation of sparse matrices is superior to the generalized dope vector method because it is
Correct
Incorrect

Question 58 of 119
58. Question
If the dope vector stores the position of the first and last nonzero entries in each row, then (i, j)^{th} entry in the array can be calculated as (L(x) and F(x) represent the last and first nonzero entries in row x)
Correct
Incorrect

Question 59 of 119
59. Question
The postfix equivalent of the prefix * + a b – c d is
Correct
Incorrect

Question 60 of 119
60. Question
The order of the binary search algorithm is
Correct
Incorrect

Question 61 of 119
61. Question
The average search time of hashing, with linear probing will be less if the load factor
Correct
Incorrect

Question 62 of 119
62. Question
A hash table can store a maximum of 10 records. Currently there are records in location 1, 3, 4, 7, 8, 9, 10. The probability of a new record going into location 2, with a hash function resolving collisions by linear probing is
Correct
Incorrect

Question 63 of 119
63. Question
Consider a hashing function that resolves collision by quadratic probing. Assume the address space is indexed from 1 to 8. Which of the following locations will never be probed if a collision occurs at position 4?
Correct
Incorrect

Question 64 of 119
64. Question
A hash table has space for 100 records, What is the probability of collision before the table is 10% full?
Correct
Incorrect

Question 65 of 119
65. Question
Which of the following remarks about Trie Indexing are true?
Correct
Incorrect

Question 66 of 119
66. Question
Which of the following remarks about Trie Indexing are true?
Correct
Incorrect

Question 67 of 119
67. Question
Pick the correct statements.
Correct
Incorrect

Question 68 of 119
68. Question
Stack cannot be used to
Correct
Incorrect

Question 69 of 119
69. Question
Let M be a 3 x 3. adjacency matrix corresponding to a given graph of three nodes labeled 1, 2, 3. If entry (1, 3) in M^{3} is 2, then the graph could be
Correct
Incorrect

Question 70 of 119
70. Question
Consider the graph in Fig. 9.6
What should be the labels of nodes marked 1 and 2 if the breadth first traversal yields the list a b c d e?Correct
Incorrect

Question 71 of 119
71. Question
If the depth first search of the graph given in Qn. 70 yields the list A B C D E, then the labels of the nodes marked 1 and 2 will be
Correct
Incorrect

Question 72 of 119
72. Question
Which of the following abstract data types can be used to represent a many to many relation?
Correct
Incorrect

Question 73 of 119
73. Question
Consider the graph in Fig. 9.7
Which of the following is a valid topological sorting?Correct
Incorrect

Question 74 of 119
74. Question
Consider the graph in Fig 9.8
Which of the following is a valid strong component?Correct
Incorrect

Question 75 of 119
75. Question
Consider the undirected weighted graph in Fig 9.9
The minimum cost spanning tree for this graph has the costCorrect
Incorrect

Question 76 of 119
76. Question
Merge sort uses
Correct
Incorrect

Question 77 of 119
77. Question
The principle of locality justifies the use of
Correct
Incorrect

Question 78 of 119
78. Question
For merging two sorted lists of sizes m and n into a sorted list of size m+n we require comparisons of
Correct
Incorrect

Question 79 of 119
79. Question
A binary tree has n leaf nodes. The number of nodes of degree 2 in this stree is
Correct
Incorrect

Question 80 of 119
80. Question
The minimum number of edges in a connected cyclic graph on n vertices is
Correct
Incorrect

Question 81 of 119
81. Question
The postfix expression for the infix expression
A + B* ( C + D) / F + D*E is:Correct
Incorrect

Question 82 of 119
82. Question
Which of the following statements is true?
I) As the number of entries in the hash table increases, the number of collisions increases.
II) Recursive programs are efficient.
III) The worst time complexity of quick sort is O(n^{2 }).
IV) Binary search implemented using a linked list is efficient.Correct
Incorrect

Question 83 of 119
83. Question
The number of binary trees with 3 nodes which when traversed in postorder gives the sequence A, B, C is
Correct
Incorrect

Question 84 of 119
84. Question
The minimum number of colors needed to color a graph having n (>3) vertices and 2 edges is
Correct
Incorrect

Question 85 of 119
85. Question
Which of the following file organizations is preferred for secondary key processing?
Correct
Incorrect

Question 86 of 119
86. Question
Mr. Fool designed a crazy language called STUPID that included the following features.
+ has precedence over /
/ has precedence over – (binary)
– (binary) has precedence over *
* and ^ (exponentiation) have the same precedence.
+ and * associate from right to left.
The rest of mentioned operators associate from left to right. Choose the correct stack priorities Mr. Fool should assign to +, *, ^, / respectively, for correctly converting an arithmetic expression in infix form to the equivalent postfix form.Correct
Incorrect

Question 87 of 119
87. Question
The infix priorities of +, *, ^, / could be
Correct
Incorrect

Question 88 of 119
88. Question
Mr. Fool’s STUPID language will evaluate the expression 2 * 2 ^ 3 * 4 to
Correct
Incorrect

Question 89 of 119
89. Question
The expression 1 * 2 ^ 3 * 4 ^ 5 * 6 will be evaluated to
Correct
Incorrect

Question 90 of 119
90. Question
In a circularly linked list organization, insertion of a record involves the modification of
Correct
Incorrect

Question 91 of 119
91. Question
Stack is useful for implementing
Correct
Incorrect

Question 92 of 119
92. Question
To store details of an employee, a storage space of 100 characters is needed. A magnetic tape with a density of 1000 characters per inch and an interrecord gap of 1 inch is used to store information about all employees in the company. What should be the blocking factor so that the wastage does not exceed onethird of the tape?
Correct
Incorrect

Question 93 of 119
93. Question
A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately
Correct
Incorrect

Question 94 of 119
94. Question
A machine took 200 sec to sort 200 names, using bubble sort. In 800 sec, it can approximately sort
Correct
Incorrect

Question 95 of 119
95. Question
The correct order of arrangement of the name Bradman, Lamb, May Boon, Border, Underwood and Boycott, so that the quick sort algorithm makes the least number of comparisons is
Correct
Incorrect

Question 96 of 119
96. Question
Which of the following is useful is traversing a given graph by breadth first search?
Correct
Incorrect

Question 97 of 119
97. Question
Which of the following is useful in implementing quick sort?
Correct
Incorrect

Question 98 of 119
98. Question
Queue can be used to implement
Correct
Incorrect

Question 99 of 119
99. Question
The expression tree given in Fig 9.10 evaluates to 1, if
Correct
Incorrect

Question 100 of 119
100. Question
A hash function randomly distributes records one by one in a space that can hold x number of records. The probability that the m^{th} record is the first record to result in collision is
Correct
Incorrect

Question 101 of 119
101. Question
The process of accessing data stored in a tape is similar to manipulating data on a
Correct
Incorrect

Question 102 of 119
102. Question
If the hashing function is the remainder on devision. then clustering is more likely to occur if the storage space is divided into 40 sectors rather than 41. This conclusion is
Correct
Incorrect

Question 103 of 119
103. Question
Unrestricted use of goto is harmful, because it
Correct
Incorrect

Question 104 of 119
104. Question
The maximum degree of any vertex in a simple graph with n vertices is
Correct
Incorrect

Question 105 of 119
105. Question
The recurrence relation that arises in relation with the complexity of binary search is
Correct
Incorrect

Question 106 of 119
106. Question
An item that is read as input can be either pushed to a stack and later popped and printed, or printed directly. Which of the following will be output if the input is the sequence of items 1, 2, 3, 4, 5?
Correct
Incorrect

Question 107 of 119
107. Question
Which of the following algorithm design technique is used in the quick sort algorithm?
Correct
Incorrect

Question 108 of 119
108. Question
Linked lists are not suitable for implementing
Correct
Incorrect

Question 109 of 119
109. Question
Which one of the following statements is false?
Correct
Incorrect

Question 110 of 119
110. Question
The number of edges in a regular graph of degree d and n vertices is
Correct
Incorrect

Question 111 of 119
111. Question
Consider the following two function
f (n) = n^{3}, if 0 ≤ n < 10.000
n^{2} , otherwise
g (n) = n, if 0 ≤ n < 100
n^{2} + 5n, otherwise
Which of the following is/are true?
Correct
Incorrect

Question 112 of 119
112. Question
A 3ary tree is a tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be
Correct
Incorrect

Question 113 of 119
113. Question
The concatenation of two lists is to be performed in O(1) time. Which of the following implementation of a list could be used?
Correct
Incorrect

Question 114 of 119
114. Question
The correct matching for the following pairs is
A) All pairs shortest path (1) Greedy
B) Quick sort (2) Depth first search
C) Minimum weight spanning space (3) Dynamic programming
D) Connected Components (4) Divide and conquerCorrect
Incorrect

Question 115 of 119
115. Question
Which of the following is essential for converting an infix expression to the postfix form efficiently?
Correct
Incorrect

Question 116 of 119
116. Question
A binary search tree contains the values – 1, 2, 3, 4, 5, 6, 7, and 8, The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output ?
Correct
Incorrect

Question 117 of 119
117. Question
Let T(n) be the function defined by
T(1) = 1, if n=1
= 2T([n/2]) + √n, for n ≥ 2
Which of the following statements is true?Correct
Incorrect

Question 118 of 119
118. Question
Which of the following need not be a binary tree?
Correct
Incorrect

Question 119 of 119
119. Question
Assume 5 buffer pages are available to sort a file of 105 pages. The cost of sorting using mway merge sort is
Correct
Incorrect