About 6,500,000 results
Open links in new tab
  1. Implement Stack using Queues - GeeksforGeeks

    Mar 25, 2025 · Implement a stack using queues. The stack should support the following operations: Push (x): Push an element onto the stack. Pop (): Pop the element from the top of …

  2. Implementation of Queues using Stack in C - PrepInsta

    How to implement Queue using Stack? Implementation of Queues using Stack in C is a process of creating a queue using Stacks. In this article, we will be using a single stack for the purpose. …

  3. algorithm - Implement Stack using Two Queues - Stack Overflow

    Mar 27, 2009 · Given two queues with their standard operations (enqueue, dequeue, isempty, size), implement a stack with its standard operations (pop, push, isempty, size). There should …

  4. Implement Stack using Queues - EnjoyAlgorithms

    Write a program to implement a stack using queues. We must use queue operations like enqueue, dequeue, front, size to implement stack operations like push, pop, and top. We have …

  5. C Program to Implement Queues using Stack - Sanfoundry

    Here is source code of the C Program to Implement Queues using Stacks. The C program is successfully compiled and run on a Linux system. The program output is also shown below. * …

  6. Implement a stack using the queue data structure - Techie …

    Dec 1, 2021 · There are several ways to implement a stack using one or two queues by tweaking their enqueue and dequeue operations. 1. Using Two Queues. The idea is to implement the …

  7. Implement Stack Using Queue

    Jun 28, 2022 · How to Implement Stack using Queue in C? We can implement stack by using two queues. Let stack be the S and queues be q1 and q2. The idea is to keep newly entered …

  8. Stack using Queue | Data Structure Tutorial - Studytonight

    Assuming we already have a class implemented for Queue, we first design the class for Stack. It will have the methods push() and pop() and two queues. public: // two queue. Queue Q1, Q2; …

  9. Queue using Stacks - GeeksforGeeks

    Mar 28, 2025 · Given a stack that supports push and pop operations, your task is to implement a queue using one or more instances of that stack along with its operations. A queue can be …

  10. Implementation of stacks using queues - Naukri Code 360

    Aug 25, 2024 · To dynamically implement a stack or queue, we can use linked lists. For a stack, we can use the linked list's head for push and pop operations. For a queue, we can use the …

  11. Some results have been removed
Refresh