参数是两个数组,arr1,arr2
stack stack = new Stack()
for(int i=0;j=0;i<arr1.length;i++){
stack.push(arr[i]);//数组1里面的入栈
while(stack.size()>0 && stack.peek()==arr2[j]){
stack.pop();
j++;
}
return stack.size() ==0;