資料結構›Ch3 堆疊與佇列
第 4 題/共 28 題
◀ DS 4/28
4. Amortized Analysis、Queue、Stack
#DS-03-004易Amortized AnalysisQueueStack

A queue QQ is implemented using two stacks SinS_{in} and SoutS_{out}. If each PUSH or POP with the stack has a cost of Θ(1)\Theta(1), what is the amortized cost per operation over a sequence of mm legal queue operations, starting from an empty state with the first operation being ENQUEUE?

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