Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
34
var assert = require('assert');
class TwoStackQueue {
/**
* @param {*} value The value to push.
*/
push(value) {}
/**
* @return {*} The popped value.
*/
pop() {}
}
const tsq = new TwoStackQueue();
tsq.push(1);
tsq.push(2);
console.log(tsq.pop()); // 1
console.log(tsq.pop()); // 2
try {
const tsq = new TwoStackQueue();
tsq.push(1);
tsq.push(2);
tsq.pop();
assert.equal(tsq.pop(), 2);
OUTPUT
Results will appear here.