方法:利用辅助栈模拟压栈过程遍历压栈vector,判断当前元素是否与弹出vector,不相等就压栈,继续向前便利压栈vector,但是弹出vector不动;相等就说明当此有出栈弹出,压入栈和弹出vector均向前一步,同时对之前已经压入栈的元素进行判断是否有弹出;最后判断辅助栈是否为空?是:否; class Solution {public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { stack<int> stk; int i = 0, j = 0; ...