Skip to content

ISRO Scientist/Engineer CSE 2017Data Structures › Linked Lists

ISRO Scientist/Engineer CSE 2017 PYQ: In a doubly linked list the number of pointers affected for an insertion operation will be

In a doubly linked list the number of pointers affected for an insertion operation will be

  1. A
    4
    Correct answer
  2. B
    0
  3. C
    1
  4. D
    Depends on the nodes of doubly linked list

Answer

(A) 4

Approach

In a doubly linked list, inserting a node generally requires updating four pointers: the new node's next and prev, plus the next pointer of the previous node and the prev pointer of the next node (or head/tail pointers in special cases). Standard exam convention counts these four affected pointers regardless of insertion at beginning or middle. The option 'Depends on the nodes' is a distractor and not the intended answer.

Reviewed by ISRO IQ Editorial Team.