The GATE Grind

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

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

  1. GATE 2017 CS 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
  2. 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…
  3. 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…
  4. 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…
  5. 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…
  6. 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?