Question: 16
(Choose 1 answer)
0
1
2
3
4
5
(1)
r
0
2
3
4
5
Consider the following pseudocode:
(2)
r
declare a queue of characters, which is implemented by circular array of size 6.
while(there are more characters in the word to read)
0
1
2
3
4
5
(3)
r
{read a character
if a character is '*' then
dequeue the queue
else
enqueue the character into the queue
(4)
0
1
2
3
4
5
r
]
}
How the queue looks like after processing the input "Hello****Worl**d*"?
A. (1)
B. (2)
C. (3)
D. (4)