50

堆栈的应用——用JavaScript描述数据结构

 5 years ago
source link: https://juejin.im/post/5b6c4976f265da0f4f1669ac
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
栈(stack)又名堆栈,它是一种运算受限的线性表。其限制是仅允许在表的一端进行插入和删除运算。这一端被称为栈顶,相对地,把另一端称为栈底。 一、实现一个栈类Stack 基于堆栈的特性,可以用数组做线性表进行存储。 初始化Stack类的结构如下: func

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK