2020年7月27日

stack 数据结构

摘要: 栈定义 栈:后进先出(永远从栈顶取元素)LIFO last-in-first-out 栈只允许操作栈顶的元素(也就是数组的最后一个元素) 栈实现 class Stack { static items = [] push(item) { Stack.items.push(item) } pop() { 阅读全文

posted @ 2020-07-27 16:29 章画 阅读(234) 评论(0) 推荐(0) 编辑

导航