2013年8月6日
摘要: 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 ... 阅读全文
posted @ 2013-08-06 13:28 xuanxu 阅读(272) 评论(0) 推荐(0) 编辑