Skip to content

单调栈 题型

js
stack = [];
for i {
  while(stack) {
    stack push pop unshift shift;
  }
  stack.push(i);
  if stack push pop unshift shift;
}