摘要: /*! \author LiuBao \date 2011/3/4 \brief 设计包含min函数的栈 定义栈的数据结构,要求添加一个min函数,能够得到栈的最小元素。 要求函数min、push以及pop的时间复杂度都是O(1)。 这里给出整个栈的宏实现,使用链式栈,仿照APR_RING设计宏函数。 */ #include <stdio.h> #include <stdlib.h> #incl... 阅读全文
posted @ 2011-03-04 21:22 紫红的泪 阅读(1890) 评论(0) 推荐(0) 编辑