package stack;
import java.util.Stack;
public class StaticShun {
public boolean hhh(int[] pushed,int[] poped){
Stack<Integer> stack = new Stack<>();
int i = 0;
for (int num:pushed){
stack.push(num);
while (!stack.isEmpty()&&stack.peek()==poped[i]){
stack.pop();
i++;
}
}
return stack.isEmpty();
}
}