JavaScript:实现Minimum Priority Queu最小优先级队列算法
class MinPriorityQueue {
// calls the constructor and initializes the capacity
constructor (c) {
this.heap = []
this
class MinPriorityQueue {
// calls the constructor and initializes the capacity
constructor (c) {
this.heap = []
this