-->
当前位置:首页 > 题库

单选题:Push and pop { 1, 3, 5, 6, 4, 7, 2 } sequentially into then out

Luz5年前 (2021-05-10)题库1253
Push and pop { 1, 3, 5, 6, 4, 7, 2 } sequentially into then out of a stack. Suppose that each number is pushed into a queue right after it gets out of the stack, and the dequeue sequence is { 1, 5, 4, 7, 6, 2, 3 }. If both the stack and the queue are initially empty, then the minimum size of the stack must be:

@[C](2)

A. 1
B. 2
C. 3
D. 4



A.1
B.2
C.3
D.4


答案:C