栈的压入,弹出序列

#include
#include
#include
using namespace std;
bool IsPopOrder(vector pushV,vector popV) {
    int pushV_size = pushV.size();
    int popV_size = popV.size();
    if(pushV_size != popV_size) return false;
    stack stack_1;
    int i=0,j=0;
    for(;i pushV = {1,2,3,4,5};
    vector popV = {4,3,5,1,2};
    bool res = IsPopOrder(pushV,popV);
    cout<

你可能感兴趣的:(栈的压入,弹出序列)