摘要:
Describe how you could use a single array to implement three stacks. 1 typedef struct Node{ 2 int val,preIdex; 3 Node(int val = INT_MIN,int preIndex=-2):val(val),preIndex(preIndex){} 4 }; 5 6 class Stack3{ 8 public: 9 Stack3(int totalSize = 900){10 buf = new Node[totalSize];11 ... 阅读全文
![](/skins/gray/images/separator.gif)