Skip to content

栈和队列

约 74 个字 1 张图片 预计阅读时间不到 1 分钟

|475

理论题

  1. Push 5 characters ooops onto a stack. In how many different ways that we can pop these characters and still obtain ooops?
Answer

5

  • ps只有一种出栈的方式。
  • 前三个o我们分别设成ABC, 除了CAB不行之外,一个个枚举,剩下五种都是可以的。

Comments