Analysis of Algorithms and Computational Complexity Questions and Answers
Practice ModeShowing 10 of 239 questions
Q211
A text is made up of the characters a, b, c, d, e each occurring with the probability 0.12, 0.4, 0.15, 0.08, and .25 respectively. The optional coding technique will have the average length of
Answer: Option A
Q212
The order of an algorithm that finds whether a given boolean function of 'n' variables, produces a 1 is
Answer: Option D
Q213
The best sorting methods if number of swappings done, is the only measure of efficiency is
Answer: Option B
Q214
The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is a 4 digit decimal number)
Answer: Option A
Q215
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
Answer: Option B
Q216
Which of the following algorithms exhibits the unnatural behaviour 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 order?
Answer: Option C
Q217
The sorting method which sorts a given set of items that is already in order or in reverse order with equal speed is
Answer: Option B
Q218
Algorithm which solves the all-pair shortest path problem is
Answer: Option B
Q219
Stack A has the entries a, b, c (with a on top). Stack B is empty. an entry propped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can only be printed. IN this arrangement, which of the following permutations of a, b, c are not possible?
Answer: Option C
Q220
In the previous problem, if the stack A has 4 entries, then the number of possible permutations will be
Answer: Option D