数据结构----栈
摘要:
// 栈 /* * 栈被称为一种后入先出(LIFO,last-in-first-out)的数据结构。 * * push : 入栈 * pop: 出栈 * top: 栈顶位置 初始化为0 表示栈顶对应数组的起始位置 0 1--》对应数组第一个元素 top-1 就是栈顶元素 peek: 预览栈顶的元素 不从栈中删除 clear: 清除栈中的元素 * */ function push... 阅读全文
posted @ 2018-10-19 18:45 斜杠人生 阅读(123) 评论(0) 推荐(0) 编辑