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. In simple terms, we can say that an algorithm is a step-by-step procedure for performing some task in a finite amount of time. State if the statement is true or false.
a. False
b. True
c. Maybe
d. None of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).True

52. Each operation must have a definite meaning and it must be perfectly clear. All steps of an algorithm need to be precisely defined. The actions to be executed in each case should be _____________.
a. Rigorously specified
b. Clearly specified
c. Both (a) and (b)
d. None of the above
View Answer Report Discuss Too Difficult!
Answer: (c).Both (a) and (b)

53. In general, a problem may be defined as a state of thing that is not in the___________.
a. Wrong order
b. Opposite order
c. Right order
d. None of the above
View Answer Report Discuss Too Difficult!
Answer: (c).Right order

54. An algorithm that requires ................... operations to complete its task on n data elements is said to have a linear runtime.
a. n^3 + 9
b. 3n^2 + 3n + 2
c. 2n + 1
d. 9
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).2n + 1

55. The complexity of adding two matrices of order m*n is
a. m + n
b. mn
c. max(m, n)
d. min(m, n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).mn

56. lg (n!) = .................
a. O(n)
b. O(lg n)
c. O(n^2)
d. O(n lg n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).O(n lg n)

57. Which of the following uses memorization?
a. Greedy approach
b. Divide and conquer approach
c. Dynamic programming approach
d. None of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Dynamic programming approach

58. An algorithm is made up of 2 modules M1&M2.; If order of M1 is f(n) & M2 is g(n) then the order of algorithm is?
a. f(n) + g(n)
b. f(n) X g(n)
c. max (f(n),g(n))
d. min (f(n),g(n))
View Answer Report Discuss Too Difficult!
Answer: (d).min (f(n),g(n))

59. An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons needed?
a. At most 1.5n-2 comparisons are needed.
b. At least nlog2n comparisons are needed.
c. At least 2n-c comparisons, for some constant c, are needed.
d. None of the above
View Answer Report Discuss Too Difficult!
Answer: (a).At most 1.5n-2 comparisons are needed.

60. The running time of an algorithm T(n),where 'n' is the input size, of a recursive algorithm is given as follows.is given by T(n) =c + T(n - 1), if n > 1 d, if n ≤ 1 The order of this algorithm is
a. n
b. n+1
c. n-1
d. n*1
View Answer Report Discuss Too Difficult!
Answer: (a).n

Page 6 of 7