+1 vote
in Data Structures & Algorithms I by (110k points)
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

(a) ABCD

(b) DCBA

(c) DCAB

(d) ABDC

My question comes from Queue Operations topic in portion Abstract Data Types of Data Structures & Algorithms I

I got this question in homework.

1 Answer

+1 vote
by (550k points)
Right answer is (a) ABCD

The best I can explain: Queue follows FIFO approach. i.e. First in First Out Approach. So, the order of removal elements are ABCD.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...