A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

51. Which of the following is a valid heap?
 heap
a. A
b. B
c. C
d. D
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).B

52. If following sequence of keys are inserted in a B+ tree with K(=3) pointers:

8, 5, 1, 7, 3, 12, 9, 6

Which of the following shall be correct B+ tree?
 B+ tree
a. 1
b. 2
c. 3
d. 4
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).1

53. Any decision tree that sorts n elements has height ..............
a. Ω(log n)
b. Ω(n)
c. Ω(n log n)
d. Ω(n2)
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Ω(n log n)

54. Red-black trees are one of many Search tree schemes that are "balanced” in order to guarantee that basic dynamic-set operations take ............. time in the worst case.
a. O(1)
b. O(log n)
c. O(n)
d. O(n log n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).O(log n)

55. Dijkstra’s algorithm is based on
a. Divide and conquer paradigm
b. Dynamic Programming
c. Greedy Approach
d. Backtracking paradigm
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Greedy Approach

56. Match the following with respect to algorithm paradigms:
List-I                              List-II
a. Merge sort                 i. Dynamic Programming
b. Huffman coding       ii. Greedy approach
c. Optimal polygon triangulation iii. Divide and conquer
d. Subset sum problem          iv. Back tracking

Codes:
     a   b  c   d
a. iii  i   ii   iv
b. ii   i   iv  iii
c. ii   i   iii  iv
d. iii  ii  i    iv
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).iii  ii  i    iv

57. Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two statements?

I. Abstraction allows us to focus on what something does without considering the complexities of how it works.
II. Encapsulation allows us to consider complex ideas while ignoring irrelevant detail that would confuse us.
a. Neither I nor II is correct
b. Both I and II are correct
c. Only II is correct
d. Only I is correct
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Neither I nor II is correct

58. Which of the following statement(s) with regard to an abstract class in JAVA is/are TRUE?

I. An abstract class is one that is not used to create objects.
II. An abstract class is designed only to act as a base class to be inherited by other classes.
a. Only l
b. Only II
c. Neither I nor II
d. Both l and II
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).Both l and II

59. With respect to a loop in the transportation table, which one of the following is not correct?
a. Every loop has an odd no. of cells and at least 5
b. Closed loops may or may not b square in shape
c. All the cells in the loop that have a plus or minus sign, except the starting cell, must be occupied cells
d. Every loop has an even no. of cells and at least four
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Every loop has an odd no. of cells and at least 5

60. At which of the following stage(s), the degeneracy do not occur in transportation problem?
(m, n represents number of sources and destinations respectively)

(a) While the values of dual variables ui and vj cannot be computed.
(b) While obtaining an initial solution, we may have less than m + n -1 allocations.
(c) At any stage while moving towards optimal solution, when two or more occupied cells with the same minimum allocation become unoccupied simultaneously.
(d) At a stage when the no. of +ve allocation is exactly m + n - 1.
a. (a), (b) and (c)
b. (a), (c) and (d)
c. (a) and (d)
d. (a), (b), (c) and (d)
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).(a) and (d)

Page 6 of 27