已知入棧序列,求全部可能的出棧序列

 思路:code 1.元素入棧遞歸 遞歸class 恢復現場top   2.出棧co 遞歸push 恢復現場return void popSeq(list<int>in,stack<int> st,vector<int> out,vector<vector<int>>& res,int len) { if (out.size() == len) { res.push_back(out);
相關文章
相關標籤/搜索