Skip to content
TryAlgoViz
Algorithms
Articles
CS Fundamentals
Problems
Roadmap
Dashboard
Theme
Implement Queue using Stacks — TryAlgoViz
Implement Queue using Stacks
easy
Visualize
Description
Hints
Discussion
Visual examples
Example 1
Input
← FRONT
1
2
BACK →
Output
[null,null,null,1,1,false]
Example 2
Input
← FRONT
7
BACK →
Output
[null,null,7,true]
Python
Reset
Run
Ctrl+Enter
Loading editor…
Test Case 1
Test Case 2
Input
← FRONT
1
2
BACK →
Expected Output
[null,null,null,1,1,false]