資料結構›Ch3 堆疊與佇列
第 12 題/共 28 題
◀ DS 12/28
12. Stack、Sequence
#DS-03-012中StackSequence

(3%) S is an ordered sequence of numbers. S is formed by two ordered sequences: {2n-1, 2n-3, …, 1} and {2, 4, 6, …, 2n}. Let S = {(2n-1), 2, (2n-3), 4, (2n-5), 6, …, 3, (2n-2), 1, 2n}, where n >= 10. The elements of S are stored into an empty stack one by one in the given order. After that the elements are popped from the stack one by one. At the X-th step, (n-1) is popped from the stack while (n+1) is popped from the stack at the Y-th step. Assume that s and t are two different positive elements of S, and s + t = 2n. Which of the following statement(s) is(are) correct?

📄 交大112
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch3 堆疊與佇列
本章題號 · 1–20 / 28