GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2021 set1

GATE 2021 set1 · CS · NAT · 1 mark · Programming and Data Structures › Stacks and Queues

GATE 2021 set1 Computer Science and Information Technology question: Consider the following sequence of operations on an empty stack. push(54); push(52);…

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 empty queue.

enqueue(21); enqueue(24); dequeue(); enqueue(28); enqueue(32); q = dequeue();

The value of s + q is ____________.

Show answer

Official answer: 86

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion