javascript的隊列,優先隊列,循環隊列

按書上的來弄的。慢慢理解了。 function Queue() { var items = []; this.enqueue = function(element){ items.push(element); } this.dequeue = function(){ return items.shift(); }
相關文章
相關標籤/搜索