Fork me on GitHub
摘要: 栈的定义:后入先出的数据结构。 定义一个栈构造函数,利用数组做缓存。 function Stack(){ this.dataStore = [] this.top = 0 // 压入一个新元素 this.push = function(element){ this.dataStore[this.to 阅读全文
posted @ 2021-04-29 22:39 我站在山顶上 阅读(217) 评论(0) 推荐(0) 编辑