The GATE Grind

GATE Programming and Data Structures: Linked Lists – Previous Year Questions

11 GATE previous year questions on Linked Lists (Programming and Data Structures, Computer Science) with answers and explanations, from every paper.

11 questions worth 16 marks in all (6 1-mark, 5 2-mark). Asked between 2008 and 2026, so you can see how the topic has been tested over time.

  1. GATE 2008 CS Q62 (2 marks, Multiple choice) – The list contains1, 2, 3, 4, 5, 6, 7. What is its content after this function?
  2. GATE 2021 CS (CS2) Q45 (2 marks, Multiple choice) – Which statement about this C program is correct?
  3. GATE 2010 CS Q46 (2 marks, Multiple choice) – For a singly linked list with at least two nodes, fill the blank to move its last node to the front.
  4. GATE 2017 CS (CS2) Q23 (1 mark, Multiple choice) – A circular queue uses a singly linked list, with value and next-pointer per node and exactly two external pointers FRONT and REAR. For O(1) insertion…
  5. GATE 2016 CS (CS2) Q25 (1 mark, Multiple choice) – N records are in a sorted doubly linked list. Node pointers are supplied for delete and decrease-key. An algorithm performs, in order, (N) deletes, O(…
  6. GATE 2017 CS (CS1) Q18 (1 mark, Multiple choice) – Consider the C code fragment given below. Assuming that `m` and `n` point to valid NULL-terminated linked lists, invocation of `join` will
  7. GATE 2026 CS (CS1) Q39 (2 marks, Multiple choice) – Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer…
  8. GATE 2025 CS (CS1) Q62 (2 marks, Numerical answer) – Let LIST be a datatype for an implementation of linked list defined as follows: Suppose a program has created two linked lists, L1 and L2, whose…
  9. GATE 2023 CS Q13 (1 mark, Multiple choice) – Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let…
  10. GATE 2022 CS Q15 (1 mark, Multiple choice) – Consider the problem of reversing a singly linked list. To take an example, given the linked list a → b → c → d → e, the reversed linked list should…
  11. GATE 2020 CS Q26 (1 mark, Multiple choice) – What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?