The Problem
Implement a stack data structure using queues.
Output
const s = new Stack();
s.push(5);
s.push(4);
s.push(3);
s.pop(); // should remove 3
s.pop(); // should remove 4
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
parent directory.. | ||||
Implement a stack data structure using queues.
const s = new Stack();
s.push(5);
s.push(4);
s.push(3);
s.pop(); // should remove 3
s.pop(); // should remove 4