Science, asked by srinivasaraomullapat, 10 hours ago

Question No. 17 of 20 1 Marks
256
DE LEE
64
en
Let Q denote a queue containing sixteen numbers and S be an empty stack. Head(Q) returns
the element at the head of the queue Q without removing it from Q. Similarly Top(S) returns
the element at the top of S without removing it from S. Consider the algorithm given below.
while is not Empty do
if Sis Empty OR Top(S) < Head(b) then
x:= Dequeue (Q);
Push(S,x);
else
x= Pop(S);
Enqueue (Q,x);
end
ES
O 16
IE
E
BO
Elle
32
end
Next Qui
The maximum possible number of iterations of the while loop in the algorithm is__17 of 21​

Answers

Answered by MONSTER20005
3

Answer:

Explanation:

Let Q denote a queue containing sixteen numbers and S be an empty stack

Similar questions