📅  最后修改于: 2022-03-11 15:02:37.391000             🧑  作者: Mango
// day 18 queues and stacks hackerrank solution javascript
function Solution(){
//Write your code here
this.stack = [];
this.queue = [];
Solution.prototype.pushCharacter = this.stack.push;
Solution.prototype.popCharacter = this.stack.pop;
Solution.prototype.enqueueCharacter = this.queue.push;
Solution.prototype.dequeueCharacter = this.queue.shift;
}