資料結構›Ch3 堆疊與佇列第 27 題/共 28 題
27. Stack
#DS-03-027易Stack
In a stack structure, let X denote a push operation and let Y denote a pop operation. After 8 stack operations, consisting of 4 pushes and 4 pops, an input sequence 1234 may change its order. For example, after XYXXYYXY is performed, 1234 will become 1324. Which of the following is (are) possible output sequences?
📄 中央112
▤完整推導請見《WH 資工筆記 · 資料結構》Ch3 堆疊與佇列