摘要: //双向链表 class Node { constructor (data) { this.data = data this.prev = null this.next = null } } class DoubleList { constructor () { this.head = null t 阅读全文
posted @ 2020-02-20 15:53 前端之旅 阅读(203) 评论(0) 推荐(0)
摘要: //链表结构 //封装节点 class Node { constructor (data) { this.data = data this.next = null } } class LinkList { constructor () { //初始化,空链表,长度为0 this.head = nul 阅读全文
posted @ 2020-02-20 11:18 前端之旅 阅读(237) 评论(0) 推荐(0)
摘要: class priorityElement { constructor (elem, priority) { this.elem = elem this.priority = priority } } class priorityQueue { constructor () { this.items 阅读全文
posted @ 2020-02-20 09:09 前端之旅 阅读(146) 评论(0) 推荐(0)