GATE CS 2021 (Forenoon) — Question 31

Data StructuresAbstract Data Types (ADTs), Stacks, QueuesNAT1 markMedium

Consider the following sequence of operations on an empty stack. \(\text{push}(54); \text{push}(52); \text{pop}( ); \text{push}(55); \text{push}(62); s = \text{pop}( );\) Consider the following sequence of operations on an empty queue. \(\text{enqueue}(21); \text{enqueue}(24); \text{dequeue}( ); \text{enqueue}(28); \text{enqueue}(32); q = \text{dequeue}( );\) The value of \(s + q\) is _________.
Practise the full 2021-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on Abstract Data Types (ADTs), Stacks, QueuesTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group