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.

Discussion Forum

Que. Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards). Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?
a. O(n logk)
b. O(nk)
c. O(n^2)
d. O(k^2)
Answer:O(n logk)
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: