相扑队
相扑队
队列数据结构实现。 将其用于大型阵列。 ··
简单易用
# Import Package
const Queue = require ( "sumo-queue" ) ;
const queue = new Queue ( 2 ) ;
// OUTPUT: 1609158613385wbQvkB5djUXB debug log: A new queue 1609158613385wbQvkB5djUXB is initialized with capacity 2
queue . enqueue ( 1 ) ;
// OUTPUT: 1609158613385wbQvkB5djUXB debug log: Node added {"currentPointerValue":1,"nextPointer":null}
console . log ( queue . iter
1