02-线性结构4 Pop Sequence (25分)(简单堆栈实现)
02-线性结构4 Pop Sequence (25分)
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the stack. For example, if M
原创
2020-05-12 12:28:26 ·
262 阅读 ·
0 评论