Answers for "day 18 queues and stacks hackerrank solution javascript"

0

day 18 queues and stacks hackerrank solution javascript

// 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;
}
Posted by: Guest on January-01-2022

Code answers related to "day 18 queues and stacks hackerrank solution javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language