2018年5月18日

实现具有getMin功能的栈

摘要: #include "stack.h" #include #include Stack SMin, SData; int PUSH(int *_d) { int temp = 0; PushStack(&SData, _d); if(EmptyStack(&SMin) == 0) PushStack(&SMin, _d); else ... 阅读全文

posted @ 2018-05-18 17:23 MrRS 阅读(106) 评论(0) 推荐(0) 编辑

用两个栈来模拟一个队列

摘要: #include "stack.h" #include #include int EnQueue(Stack *_push, int *_d) { if(FullStack(_push) == 0) return -1; PushStack(_push, _d); } int DeQueue(Stack *_push, Stack *_pop, int ... 阅读全文

posted @ 2018-05-18 15:29 MrRS 阅读(221) 评论(0) 推荐(0) 编辑

导航