卷別
資料結構
選擇國立中央大學 2026 · 考試 · 第 7 題
考科資料結構
How do we use a stack structure when evaluating postfix expressions (e.g., 3 4 + 5 * 7 / 2 -)?
- (A)When encountering an operand, push; when encountering an operator, pop two numbers. Perform the operation on the two numbers and then push the result.
- (B)When encountering an operator, use Push; when encountering an operand, use Pop.
- (C)Push all operands and operators encountered, and then calculate again at the end.
- (D)This requires using columns, not stacks.