Skip to main content
GATE CSE

Data Structures PYQs (GATE CSE Data Structures previous year questions)

Practise real GATE CSE Data Structures previous year questions from 1987–2026. Attempt questions, check your answers and learn with the stored explanations.

  • 160GATE CSE PYQs in archive
  • 1987–202637 exam years
  • 4 chapters17 analysed topics
  • Allhave a verified solution

Practice Questions

Question 1 of 10
GATE CSE 2026Data StructuresStacks, Queues, Linked Lists & Arrays2 marks

Consider a stack SS and a queue QQ. 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 that order. When an element arrives, it is assigned either to SS (pushed on SS ) or to QQ (enqueued to QQ ). Once all the five elements are stored, the output is generated in two steps. First, stack S is emptied by popping all elements. Then queue QQ is emptied by dequeueing all elements. The output obtained by following this process is 43125.


Given the output, the objective is to predict whether an element was assigned to SS or QQ.

Which of the following options is/are possible valid assignment(s) of the elements?

Note: In the options, the notation xSx S denotes that element xx was assigned to SS and yQy Q denotes that element yy was assigned to QQ.

Choose all correct options

Answer at least one question to submit.

Help us improve: tell us what to fix or add

Sign in to send feedback (it takes under a minute), or create a free account.

About Data Structures

Data Structures has 10 analysed topics in the GateIQ archive. The ones that have appeared most often in GATE CSE are Binary Tree, Binary Search Tree, Binary Heap.

9 of them are rated high or very high value by the same transparent frequency, recurrence, recentness and solvability weighting used across the archive.

The practice set draws on 160 GATE CSE questions from 37 papers between 1987–2026. 160 of them carry a verified worked solution, shown after you submit.

Topics (17)

Year-wise PYQs

Number of GATE CSE Data Structures questions in each paper.

  • 20261
  • 20257
  • 20243
  • 20235
  • 20223
  • 20216
  • 20205
  • 20192
  • 20183
  • 20175
  • 20167
  • 201514
  • 20149
  • 20135
  • 20122
  • 20112
  • 20104
  • 20094
  • 20082
  • 20078
  • 20065
  • 20056
  • 200412
  • 20036
  • 20023
  • 20012
  • 20003
  • 19984
  • 19974
  • 19966
  • 19953
  • 19943
  • 19921
  • 19912
  • 19901
  • 19891
  • 19871