Queues questions

Q44

GATE CS 2013 CSLinear Data StructuresMCQ2 marks−2/3 if wrong
Consider the following operation along with Enqueue and Dequeue operations on queues, where kk is a global parameter.
MultiDequeue(Q){
  m = k
  while (Q is not empty) and (m > 0) {
    Dequeue(Q)
    m = m – 1
  }
}
What is the worst case time complexity of a sequence of nn queue operations on an initially empty queue?
Show answer without attempting

Answer: A

0/10 correct0 marks

Related topics in Linear Data Structures