Questions

  1. GATE CS 2026 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.50

    Consider a stack and a queue . Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and 5 arrive one by one, in tha...

    Stacks and Queues

  2. GATE CS 2025 Set 2MSQ2 marksEasy (estimate)

    GATE CS 2025 Set 2, Q.45

    Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all keys are distinct. We...

    Stacks and Queues

  3. GATE CS 2024 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2024 Set 2, Q.48

    Let S1 and S2 be two stacks. S1 has capacity of 4 elements. S2 has capacity of 2 elements. S1 already has 4 elements: 100, 200, 300, and 400, whereas S2 is empty, as...

    Stacks and Queues

  4. GATE CS 2023NAT2 marksEasy (estimate)

    GATE CS 2023, Q.59

    Consider a sequence of elements , and . The following operations are performed on a stack and a queue , both of...

    Stacks and Queues

  5. GATE CS 2022NAT2 marksHard (estimate)

    GATE CS 2022, Q.62

    Consider the queues Q1 containing four elements and Q2 containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(Q,...

    Stacks and Queues

  6. GATE CS 2021 Set 1NAT1 markEasy (estimate)

    GATE CS 2021 Set 1, Q.31 (CS Q.21)

    Consider the following sequence of operations on an empty stack. push(54); push(52); pop(); push(55); push(62); s = pop(); Consider the following sequence of operations on an...

    Stacks and Queues

  7. GATE CS 2018MCQ1 markEasy (estimate)

    GATE CS 2018, Q.13 (CS Q.3)

    A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote the number of nodes in the...

    Stacks and Queues

  8. GATE CS 2017 Set 2MCQ1 markEasy (estimate)

    GATE CS 2017 Set 2, Q.13 (CS Q.13)

    A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two exte...

    Stacks and Queues · Arrays and Linked Lists

  9. GATE CS 2016 Set 1MCQ1 markEasy (estimate)

    GATE CS 2016 Set 1, Q.20 (CS Q.10)

    A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT ( refers to the num...

    Stacks and Queues

  10. GATE CS 2016 Set 1NAT2 marksMedium (estimate)

    GATE CS 2016 Set 1, Q.51 (CS Q.41)

    Let denote a queue containing sixteen numbers and be an empty stack. returns the element at the head of the queue without removing it from . Simi...

    Stacks and Queues

  11. GATE CS 2015 Set 3MCQ1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.22 (CS Q.12)

    The result evaluating the postfix expression is

    Stacks and Queues

  12. GATE CS 2014 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 2, Q.51 (CS Q.41)

    Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the...

    Stacks and Queues

  13. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.44 (CS Q.44)

    Consider the following operation along with Enqueue and Dequeue operations on queues, where is a global parameter. MultiDequeue(Q){ m = k while (Q is not empty) and...

    Stacks and Queues

  14. GATE CS 2012MCQ2 marksEasy (estimate)

    GATE CS 2012, Q.35 (CS Q.35)

    Suppose a circular queue of capacity () elements is implemented with an array of elements. Assume that the insertion and deletion operations are carried out using REA...

    Stacks and Queues

Other topics of Data Structures