InterviewSolution
Saved Bookmarks
| 1. |
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(n2)(D) O(k2) |
| Answer» | |