Linear Data Structures questions

Q21

GATE CS 2021 CS-1Linear Data StructuresNAT1 mark
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 without attempting

Answer: 86

0/10 correct0 marks

Related topics in Programming and Data Structures