We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Queues: A Tale of Two Stacks
- Discussions
Queues: A Tale of Two Stacks
Queues: A Tale of Two Stacks
Sort by
recency
|
418 Discussions
|
Please Login in order to post a comment
With some of these challenges, I have no idea where to start and no idea how anyone else does either, like my brain isn't wired in the necessary way. I suspected this would be another example but on this occasion I'm baffled as to why this is a challenge at all. The simplistic solution below works for all test cases.
#include #include #include #include #include #include #include using namespace std;
int main() { queue q1; int q, type, x; cin >> q;
} 30.
Here's how I did it in Python3:
JS
My javascript solution, should have been shorter with a simpler input