卷別
資料結構與演算法
選擇國立臺灣大學 2026 · 考試 · 第 1 題
考科演算法
(4 points) Let be a stack containing coefficients , where , is at the top of the stack, and is at the bottom. The following algorithm computes . Identify the missing expression in the pseudocode.
POLY(S, x):
1 while S.size ≥ 2
2 u = S.pop()
3 v = S.pop()
4 S.push(□)
5 return S.pop()
- (A)
- (B)
- (C)
- (D)
- (E)None of the other choices.