摘要: interface NodeItem { prev: NodeItem | null next: NodeItem | null data: any } class NodeItem { prev: NodeItem | null = null next: NodeItem | null = nul 阅读全文
posted @ 2022-03-28 23:31 ajajaz 阅读(130) 评论(0) 推荐(0) 编辑
摘要: interface Stack { _items: any push(element: any): void pop(): any top(): any size(): any isEmpty(): any clear(): any } //用Symbol添加私有属性 class Stack { _ 阅读全文
posted @ 2022-03-28 12:04 ajajaz 阅读(114) 评论(0) 推荐(0) 编辑