Stack Using Two Queues
Implement a stack with two queues. Commands: push x, top, pop, empty. Print the result of every top, pop and empty.
Constraints
1 <= q <= 10^5
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.