Deque (Double Ended Queue) allows insertion and deletion at both ends.
🎓 AMU MCA📅 Year: 2022📚 Computer🏷 Data Structures
3
If we have six stack operations; pushing and popping each of $A$, $B$ and $C$ such that push$(A)$ must occur before push$(B)$ which must occur before push$(C)$, then $A,B,C$ is a possible order for the pop operations. Which one of the following orders could not be the order the pop operations are run, if we are to satisfy the requirements described above?
Push order: $A \rightarrow B \rightarrow C$
Valid pop orders must follow stack (LIFO) constraints.
BAC cannot occur under stack rules with given push order.